feat: authorization

This commit is contained in:
moolcoov
2025-03-01 20:24:23 +03:00
parent f74b8df791
commit 535b0c39dc
22 changed files with 560 additions and 108 deletions
@@ -0,0 +1,17 @@
import { useUserStore } from "@/shared/stores/user";
import React from "react";
import { Outlet } from "react-router";
export const AuthLayout = () => {
const fetchUser = useUserStore((state) => state.fetchUser);
React.useEffect(() => {
async function fetchData() {
await fetchUser();
}
fetchData();
}, []);
return <Outlet />;
};