tab-seperated modals + eslint fix + much more bug fixed and improvements

This commit is contained in:
Daniel
2023-06-10 02:01:14 +03:30
parent dcdef77387
commit 2df4aad077
64 changed files with 713 additions and 373 deletions
+3 -3
View File
@@ -3,18 +3,18 @@ import { useSession } from "next-auth/react";
import Loader from "../components/Loader";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import getInitialData from "@/lib/client/getInitialData";
import useInitialData from "@/hooks/useInitialData";
interface Props {
children: ReactNode;
}
export default function ({ children }: Props) {
export default function AuthRedirect({ children }: Props) {
const router = useRouter();
const { status } = useSession();
const [redirect, setRedirect] = useState(true);
getInitialData();
useInitialData();
useEffect(() => {
if (!router.pathname.startsWith("/public")) {
+1 -1
View File
@@ -10,7 +10,7 @@ interface Props {
children: ReactNode;
}
export default function ({ children }: Props) {
export default function MainLayout({ children }: Props) {
const { status } = useSession();
const router = useRouter();
const redirect = useRedirect();