mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 03:57:09 +00:00
18 lines
360 B
TypeScript
18 lines
360 B
TypeScript
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 />;
|
|
};
|