mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
use FC instead of FunctionalComponent
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { FunctionComponent } from 'react'
|
||||
import React, { FC } from 'react'
|
||||
|
||||
export interface UIState {
|
||||
displaySidebar: boolean
|
||||
@@ -15,7 +15,7 @@ const initialState = {
|
||||
export const UIContext = React.createContext(initialState)
|
||||
UIContext.displayName = 'UIContext'
|
||||
|
||||
export const UIProvider: FunctionComponent = (props) => {
|
||||
export const UIProvider: FC = (props) => {
|
||||
const [state, dispatch] = React.useReducer(uiReducer, initialState)
|
||||
|
||||
const openSidebar = () => dispatch('OPEN_SIDEBAR')
|
||||
|
Reference in New Issue
Block a user