Skip to content

Commit

Permalink
Locked article edit page behind login
Browse files Browse the repository at this point in the history
  • Loading branch information
ansengarvin committed Apr 26, 2024
1 parent 955285d commit 39bd5ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/routes/Article.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
let article: Article;
let notFound = false;
onMount(async () => {
if (editMode && !$user.loggedIn) {
alert(
"You are not logged in. You are being redirected to home. TODO: Make this better."
);
navigate("/");
}
await refreshArticle();
});
Expand Down

0 comments on commit 39bd5ea

Please sign in to comment.