fix UserList :3

This commit is contained in:
cue
2024-04-03 06:16:25 +03:00
parent 18161c9227
commit 5214e03bfc
2 changed files with 10 additions and 12 deletions
@@ -1,6 +1,5 @@
import { useTranslation } from "react-i18next";
import { Button } from "../../shared/ui/button";
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "../../shared/ui/card"
import { Card, CardHeader, CardTitle, CardContent } from "../../shared/ui/card"
import less from "./PlayerCard.module.less";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "../../shared/ui/dialog";
import { Separator } from "../../shared/ui/separator";
@@ -1,11 +1,9 @@
import { Button } from "../../shared/ui/button";
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from "../../shared/ui/resizable";
import less from "./Admin.module.less";
import PlayerCard from "../../entities/PlayerCard/PlayerCard";
import { useTranslation } from "react-i18next";
import CreateTeam from "../../widgets/CreateTeams/CreateTeams";
import { UserList } from "../AdminEventPage/AdminEventAPI";
@@ -26,7 +24,7 @@ const AdminPage = () => {
var index = window.location.pathname.indexOf("/dash/admin/") + "/dash/admin/".length;
var result = window.location.pathname.substring(index);
if(Number(result) > 0){
UserList(result)
.then((data) => {
setPlayerList(data);
@@ -34,6 +32,7 @@ var result = window.location.pathname.substring(index);
.catch((error) => {
console.error("Возникла ошибка с получением:", error);
});
}
}, []);
return (
<ResizablePanelGroup className={less["full-content"]} direction="horizontal">