diff --git a/src/LocationProvider.tsx b/src/LocationProvider.tsx index b7eb316..8e10e69 100644 --- a/src/LocationProvider.tsx +++ b/src/LocationProvider.tsx @@ -1,5 +1,5 @@ import { WindowLocation } from "@reach/router" -import React, { FC, PropsWithChildren, useMemo } from "react" +import React, { FC, useMemo } from "react" function appendSlashToPath(path: string): string { return path.endsWith("/") ? path : `${path}/` @@ -26,9 +26,10 @@ export const LocationContext = React.createContext> = ({ children, location }) => { +export const LocationProvider: FC = ({ + children, + location, +}) => { const memoizedContextValue = useMemo( () => ({ location, diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 9eee85c..a06425b 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, HTMLAttributes, PropsWithChildren } from "react" +import React, { FC, HTMLAttributes } from "react" import Scrollbar from "react-perfect-scrollbar" import "react-perfect-scrollbar/dist/css/styles.css" import cx from "classnames" @@ -17,9 +17,7 @@ const MenuItem: FC = ({ children, to }) => { ) } -export const Sidebar: FC>> = ( - props -) => { +export const Sidebar: FC> = (props) => { const { children, ...restProps } = props return (