diff --git a/src/components/ClientCard.tsx b/src/components/ClientCard.tsx index 2597e98..b64ae39 100644 --- a/src/components/ClientCard.tsx +++ b/src/components/ClientCard.tsx @@ -1,11 +1,19 @@ import { Client } from "../types/Client"; import ChevronRightIcon from "./icons/ChevronRightIcon"; import Button from "./Button"; +import useModalStore from "../stores/useModalStore"; +import ClientModal from "./modals/ClientModal"; function ClientCard({ client }: { client: Client }) { + const { setModal } = useModalStore(); + return ( <> - diff --git a/src/pages/DashboardPage.tsx b/src/pages/DashboardPage.tsx index bab5ab8..ed16f40 100644 --- a/src/pages/DashboardPage.tsx +++ b/src/pages/DashboardPage.tsx @@ -30,19 +30,6 @@ function DashboardPage() { enabled: !!me, }); - // async function logout() { - // return await api.get("auth/logout").json(); - // } - - // async function handleClickLogout() { - // try { - // await logout(); - // setToken(null); - // } catch (error) { - // toast.error((await (error as HTTPError).response.json()).error); - // } - // } - const navigate = useNavigate(); return ( @@ -60,7 +47,6 @@ function DashboardPage() { -

Последние сеансы

diff --git a/src/pages/SessionsPage.tsx b/src/pages/SessionsPage.tsx index 89fa99d..ca716d4 100644 --- a/src/pages/SessionsPage.tsx +++ b/src/pages/SessionsPage.tsx @@ -83,7 +83,7 @@ function SessionsPage() { } return ( -
+

Сеансы

diff --git a/src/stores/useModalStore.ts b/src/stores/useModalStore.ts index 549ec2d..0960191 100644 --- a/src/stores/useModalStore.ts +++ b/src/stores/useModalStore.ts @@ -14,10 +14,7 @@ const useModalStore = create()( (set) => ({ modal: null, setModal: (modal) => { - if (!modal) { - set({ position: "center" }); - } - + if (!modal) set({ position: "center" }); set({ modal }); }, position: "center",