refact: convert components to use React.FC type + type improvements

This commit is contained in:
Phi
2019-09-17 17:06:43 -04:00
committed by Jean-Philippe Sirois
parent d61c218657
commit 1d88367645
23 changed files with 89 additions and 74 deletions
+2 -6
View File
@@ -1,8 +1,4 @@
import React, { useMemo, useState } from "react"
interface ISidebarProviderProps {
children: React.ReactNode
}
import React, { FC, useMemo, useState } from "react"
export interface ISidebarContextInterface {
current: number
@@ -13,7 +9,7 @@ export const SidebarContext = React.createContext<ISidebarContextInterface | nul
null
)
export function SidebarProvider({ children }: ISidebarProviderProps) {
export const SidebarProvider: FC = ({ children }) => {
const [current, setCurrent] = useState(0)
const memoizedContextValue = useMemo(