File tree 5 files changed +11
-52
lines changed
5 files changed +11
-52
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4
4
< meta charset ="UTF-8 " />
5
5
< link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7
- < link rel =" stylesheet " href ="stylesheet ">
7
+ < link href =" /src/styles.css " rel ="stylesheet ">
8
8
< title > Vite + React</ title >
9
9
</ head >
10
10
< body >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,19 +6,21 @@ const useCount = ()=>{
6
6
return useContext ( CounterContext )
7
7
}
8
8
9
- const AuthProvider = ( ) => {
9
+ const CounterProvider = ( props ) => {
10
10
const [ count , setCount ] = useState ( '' ) ;
11
11
12
-
12
+ const Increment = ( ) => ( setCount ( count - 1 ) )
13
+ const Decrement = ( ) => ( setCount ( count + 1 ) )
13
14
14
15
const value = {
15
- count,
16
- setCount,
16
+ count, setCount,
17
+ Increment,
18
+ Decrement
17
19
}
18
20
19
- return < AuthProvider . Provider value = { value } >
20
-
21
- </ AuthProvider . Provider >
21
+ return < useCount . Provider value = { value } >
22
+ { props . children }
23
+ </ useCount . Provider >
22
24
}
23
25
24
- export default AuthProvider
26
+ export default CounterProvider
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import Counter from '../components/common/Counter'
3
2
import { Card } from '../components/index'
4
3
5
4
const Login = ( ) => {
6
5
return (
7
6
< >
8
7
< Card />
9
8
< div className = 'font-black text-2xl border-2' > Login page </ div >
10
- < Counter />
11
9
</ >
12
10
)
13
11
}
You can’t perform that action at this time.
0 commit comments