Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehranalam authored May 10, 2024
1 parent 9a39509 commit f4d5b0c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,16 @@
<body>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
<script>
if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", (user) => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/admin/";
});
}
});
}
</script>
</body>
</html>

0 comments on commit f4d5b0c

Please sign in to comment.