fix tsc error

This commit is contained in:
shenjianZ 2025-09-16 19:15:02 +08:00
parent 414737fd48
commit dddcf4beaf
3 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { useState, FormEvent } from 'react';
import { useState, type FormEvent } from 'react';
import { useAuth } from '@/lib/auth';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';

View File

@ -1,8 +1,9 @@
import type { ReactNode } from 'react';
import { Navigate } from 'react-router-dom';
import { useAuth } from '@/lib/auth';
export function ProtectedRoute({ children }: { children: JSX.Element }) {
export function ProtectedRoute({ children }: { children: ReactNode }) {
const { user } = useAuth();
if (!user) {

View File

@ -1,4 +1,4 @@
import { createContext, useContext, useState, ReactNode, useEffect } from 'react';
import { createContext, useContext, useState, type ReactNode, useEffect } from 'react';
// Define the shape of the user object
interface User {