Socialify

Folder ..

Viewing ConfigContext.ts
16 lines (12 loc) • 424.0 B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import React from 'react'

import { DEFAULT_CONFIG } from '../../common/configHelper'
import Configuration from '../../common/types/configType'

type ConfigContextType = {
  config: Configuration
  setConfig: (config: Configuration) => void
}

const ConfigContext: React.Context<ConfigContextType> = React.createContext({
  config: DEFAULT_CONFIG,
  setConfig: (config: Configuration) => {}
})

export default ConfigContext