-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
30 lines (27 loc) · 876 Bytes
/
App.js
File metadata and controls
30 lines (27 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { useState } from 'react';
import TabNavigation from './src/navigations/TabNavigation';
import ColorContext from './src/stores/ColorContext';
import StoryContext from './src/stores/StoryContext';
import storiesdb from './src/stores/storiesdb';
export default function App() {
const [colors, setColors] = useState({
Love: 'PINK',
Angry: 'RED',
Happy: 'YELLOW',
Joyful: 'GREEN',
Amazed: 'SKYBLUE',
Sick: 'BLUE',
Shy: 'PURPLE',
Panic: 'GRAY',
Laugh: 'BEIGE',
});
const [storyNum, setStoryNum] = useState(storiesdb.length + 2);
const [stories, setStories] = useState(storiesdb);
return (
<StoryContext.Provider value={{ stories, setStories, storyNum, setStoryNum }}>
<ColorContext.Provider value={{ colors, setColors }}>
<TabNavigation />
</ColorContext.Provider>
</StoryContext.Provider>
);
}