fix UserList :3
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Button } from "../../shared/ui/button";
|
import { Card, CardHeader, CardTitle, CardContent } from "../../shared/ui/card"
|
||||||
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "../../shared/ui/card"
|
|
||||||
import less from "./PlayerCard.module.less";
|
import less from "./PlayerCard.module.less";
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "../../shared/ui/dialog";
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "../../shared/ui/dialog";
|
||||||
import { Separator } from "../../shared/ui/separator";
|
import { Separator } from "../../shared/ui/separator";
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import { Button } from "../../shared/ui/button";
|
|
||||||
import {
|
import {
|
||||||
ResizableHandle,
|
ResizableHandle,
|
||||||
ResizablePanel,
|
ResizablePanel,
|
||||||
ResizablePanelGroup,
|
ResizablePanelGroup,
|
||||||
} from "../../shared/ui/resizable";
|
} from "../../shared/ui/resizable";
|
||||||
import less from "./Admin.module.less";
|
import less from "./Admin.module.less";
|
||||||
import PlayerCard from "../../entities/PlayerCard/PlayerCard";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import CreateTeam from "../../widgets/CreateTeams/CreateTeams";
|
import CreateTeam from "../../widgets/CreateTeams/CreateTeams";
|
||||||
import { UserList } from "../AdminEventPage/AdminEventAPI";
|
import { UserList } from "../AdminEventPage/AdminEventAPI";
|
||||||
@@ -26,14 +24,15 @@ const AdminPage = () => {
|
|||||||
var index = window.location.pathname.indexOf("/dash/admin/") + "/dash/admin/".length;
|
var index = window.location.pathname.indexOf("/dash/admin/") + "/dash/admin/".length;
|
||||||
|
|
||||||
var result = window.location.pathname.substring(index);
|
var result = window.location.pathname.substring(index);
|
||||||
|
if(Number(result) > 0){
|
||||||
UserList(result)
|
UserList(result)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
setPlayerList(data);
|
setPlayerList(data);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Возникла ошибка с получением:", error);
|
console.error("Возникла ошибка с получением:", error);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<ResizablePanelGroup className={less["full-content"]} direction="horizontal">
|
<ResizablePanelGroup className={less["full-content"]} direction="horizontal">
|
||||||
|
|||||||
Reference in New Issue
Block a user