Skip to content

Commit

Permalink
refactor: clean props for app
Browse files Browse the repository at this point in the history
  • Loading branch information
FilippovAM committed Apr 9, 2020
1 parent 0e7efeb commit 4c767c4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import LocaleStoreProvider from './store/locale'
import { TabsEnum } from './constants/tabs'

const App = () => {
const dummyInitialTabs = {
const dummyProps = {
tabs: [TabsEnum.CAMERA, TabsEnum.FILE, TabsEnum.DROPBOX, TabsEnum.FACEBOOK],
activeTab: TabsEnum.FACEBOOK
}
const dummyInitialLocale = {
activeTab: TabsEnum.FACEBOOK,
lang: 'en',
locales: {
ru: {
Expand All @@ -21,8 +19,8 @@ const App = () => {
}

return (
<LocaleStoreProvider initialState={dummyInitialLocale}>
<WidgetApp {...dummyInitialTabs} />
<LocaleStoreProvider initialState={{lang: dummyProps.lang, locales: dummyProps.locales}}>
<WidgetApp tabs={dummyProps.tabs} activeTab={dummyProps.activeTab} />
</LocaleStoreProvider>
)
}
Expand Down

0 comments on commit 4c767c4

Please sign in to comment.