mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
Fixed: Redirect when not logged in.
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user