diff --git a/frontend/src/components/blog/comments/CommentLock.tsx b/frontend/src/components/blog/comments/CommentLock.tsx
index 9aaa844..55acaa4 100644
--- a/frontend/src/components/blog/comments/CommentLock.tsx
+++ b/frontend/src/components/blog/comments/CommentLock.tsx
@@ -5,7 +5,9 @@ export default function CommentLock() {
onMount(() => {
const path = window.location.pathname;
- setCurrentPath(`/auth/sign-in?redirect=${encodeURIComponent(path)}`);
+ const hash = window.location.hash;
+ const redirectTo = hash ? `${path}${hash}` : path;
+ setCurrentPath(`/auth/sign-in?redirect=${encodeURIComponent(redirectTo)}`);
});
return (
@@ -23,7 +25,7 @@ export default function CommentLock() {
>