Fix TypeScript errors for Netlify Identity integration
- Add proper TypeScript types for Netlify Identity in env.d.ts - Define NetlifyUser and NetlifyIdentity interfaces - Fix ESLint errors by removing 'any' types - Add optional chaining for safe access - Apply code formatting with Prettier All TypeScript, ESLint, and Prettier checks now pass successfully. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
<script>
|
||||
// Initialize Netlify Identity widget
|
||||
if (window.netlifyIdentity) {
|
||||
window.netlifyIdentity.on("init", user => {
|
||||
window.netlifyIdentity.on('init', (user) => {
|
||||
if (!user) {
|
||||
window.netlifyIdentity.on("login", () => {
|
||||
document.location.href = "/admin/";
|
||||
window.netlifyIdentity.on('login', () => {
|
||||
document.location.href = '/admin/';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user