Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
promiseonuoha committed Nov 15, 2024
1 parent 4c36f1e commit 9cc7818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"rules": {
"react-hooks/exhaustive-deps": "off"
}
}
2 changes: 0 additions & 2 deletions app/(authenticated)/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ export default function UserLayout({ children }) {
const token = Cookies.get("analogueshifts");

useEffect(() => {
// Redirect To Login if User is not Authenticated
if (!user && !token) {
Cookies.set("RedirectionLink", pathname);
window.location.href = "https://auth.analogueshifts.app?app=pay";
return null;
} else if (!user && token) {
// Fetch User
getUser({ setLoading, layout: "authenticated" });
}
}, []);
Expand Down

0 comments on commit 9cc7818

Please sign in to comment.