File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 1
- import axios from ' axios'
2
- import React , { useState , useContext , useEffect } from ' react'
1
+ import axios from " axios" ;
2
+ import React , { useState , useContext , useEffect } from " react" ;
3
3
4
4
const table = {
5
5
sports : 21 ,
6
6
history : 23 ,
7
7
politics : 24 ,
8
- }
8
+ } ;
9
9
10
- const API_ENDPOINT = ' https://opentdb.com/api.php?'
10
+ const API_ENDPOINT = " https://opentdb.com/api.php?" ;
11
11
12
- const url = ''
12
+ const url = "" ;
13
13
14
- const AppContext = React . createContext ( )
14
+ const tempUrl =
15
+ "https://opentdb.com/api.php?amount=10&category=21&difficulty=easy&type=multiple" ;
16
+
17
+ const AppContext = React . createContext ( ) ;
15
18
16
19
const AppProvider = ( { children } ) => {
17
- return < AppContext . Provider value = ' hello' > { children } </ AppContext . Provider >
18
- }
20
+ return < AppContext . Provider value = " hello" > { children } </ AppContext . Provider > ;
21
+ } ;
19
22
// make sure use
20
23
export const useGlobalContext = ( ) => {
21
- return useContext ( AppContext )
22
- }
24
+ return useContext ( AppContext ) ;
25
+ } ;
23
26
24
- export { AppContext , AppProvider }
27
+ export { AppContext , AppProvider } ;
You can’t perform that action at this time.
0 commit comments