Fixed: Redirect when not logged in.

This commit is contained in:
Towfiq
2022-11-25 09:21:07 +06:00
parent 51ebe3e326
commit 5fb085bdce

View File

@@ -17,6 +17,9 @@ const Home: NextPage = () => {
setLoading(true);
fetch(`${process.env.NEXT_PUBLIC_APP_URL}/api/domains`)
.then((result) => {
if (result.status === 401) {
router.push('/login');
}
return result.json();
})
.then((domainsRes:any) => {