Merge branch 'main' of github.com:Central-University-IT-prod/PROD-Animulichki-SkillHub
This commit is contained in:
@@ -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,14 +24,15 @@ const AdminPage = () => {
|
||||
var index = window.location.pathname.indexOf("/dash/admin/") + "/dash/admin/".length;
|
||||
|
||||
var result = window.location.pathname.substring(index);
|
||||
|
||||
UserList(result)
|
||||
.then((data) => {
|
||||
setPlayerList(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Возникла ошибка с получением:", error);
|
||||
});
|
||||
if(Number(result) > 0){
|
||||
UserList(result)
|
||||
.then((data) => {
|
||||
setPlayerList(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Возникла ошибка с получением:", error);
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
return (
|
||||
<ResizablePanelGroup className={less["full-content"]} direction="horizontal">
|
||||
|
||||
@@ -113,7 +113,7 @@ const Main = () => {
|
||||
</Card>
|
||||
))}
|
||||
<Button variant="link" asChild>
|
||||
<Link to={"/dash/admin"}>{t("iorganizer")}</Link>
|
||||
<Link to={"/dash/skill-tree"}>{t("iorganizer")}</Link>
|
||||
</Button>
|
||||
</div>
|
||||
<div className={less["general-right"] + " shadow"}></div>
|
||||
|
||||
Reference in New Issue
Block a user