mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
add props interfaces for AuthProvider, CustomBrowserRouter
This commit is contained in:
@@ -2,7 +2,11 @@ import React, { useEffect, useState } from "react";
|
||||
import { auth } from "./firebase";
|
||||
import AuthContext from "./contexts/authContext";
|
||||
|
||||
export const AuthProvider = ({ children }: any) => {
|
||||
interface IAuthProviderProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export const AuthProvider: React.FC<IAuthProviderProps> = ({ children }) => {
|
||||
const [currentUser, setCurrentUser] = useState();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -3,7 +3,11 @@ import { BrowserRouter, Route } from "react-router-dom";
|
||||
|
||||
export const RouterContext = React.createContext({});
|
||||
|
||||
const CustomBrowserRouter = ({ children }: any) => (
|
||||
interface ICustomBrowserProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const CustomBrowserRouter: React.FC<ICustomBrowserProps> = ({ children }) => (
|
||||
<BrowserRouter>
|
||||
<Route>
|
||||
{routeProps => (
|
||||
|
||||
Reference in New Issue
Block a user