fix tsc error
This commit is contained in:
parent
414737fd48
commit
dddcf4beaf
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue