Skip to content

Commit

Permalink
fix: routing issue resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
MridulDhiman committed Nov 2, 2024
1 parent e0962d6 commit 2b1710c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
prettier --write .
2 changes: 1 addition & 1 deletion app/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function Navbar() {
}}
className="bg-white px-2 p-1 flex gap-2 hover:bg-slate-200"
>
<Code className={"size-4 fill-white"} /> New Shard
<Code className={"size-4 fill-white"} /> New Shard
</li>
<li
onClick={() => {
Expand Down
5 changes: 2 additions & 3 deletions components/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const Login = () => {

useEffect(() => {
if (session) {
router.replace("/your-work");
console.log("session not found", session);
router.replace("/");
}
}, [session]);

Expand All @@ -36,8 +37,6 @@ const Login = () => {
password,
callbackUrl: `/your-work`,
});

// router.push("/your-work");
} catch (error) {
setError("Invalid Credentials!");
// throw error;
Expand Down
2 changes: 1 addition & 1 deletion lib/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getThreadedComments } from "@/utils";

export const signOutHandler = async () => {
await signOut();
router.replace("/login");
redirect("/login");
};

export const handleRouteShift = () => {
Expand Down

0 comments on commit 2b1710c

Please sign in to comment.