fix: update RequireAuth component to accept ReactNode as children type
This commit is contained in:
@@ -226,7 +226,7 @@ jobs:
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.PROJECT_TOKEN }}
|
||||
password: ${{ secrets.PROJECT_TOKEN }} # yamllint disable-line rule:line-length
|
||||
|
||||
# Step 2: Pull the image we just built
|
||||
- name: 📥 Pull Docker image
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Navigate, useLocation } from 'react-router-dom';
|
||||
import { useAuth } from '../context/AuthContext';
|
||||
|
||||
const RequireAuth: React.FC<{ children: JSX.Element }> = ({ children }) => {
|
||||
const RequireAuth: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
const { isAuthenticated, isLoading } = useAuth();
|
||||
const location = useLocation();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user