refact: clean up useless PropsWithChildren type

This commit is contained in:
Jean-Philippe Sirois
2020-09-18 19:39:12 -04:00
parent b2308f682f
commit b1f95ba204
2 changed files with 7 additions and 8 deletions
+5 -4
View File
@@ -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<ILocationContextInterface | n
null
)
export const LocationProvider: FC<PropsWithChildren<
ILocationProviderProps
>> = ({ children, location }) => {
export const LocationProvider: FC<ILocationProviderProps> = ({
children,
location,
}) => {
const memoizedContextValue = useMemo(
() => ({
location,