blob: 1885791976b82c750b362b2101c4d05900f7e326 (
plain) (
blame)
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
|
import { useState } from 'react'
import List from './List'
import Edit from './Edit'
const Main = ({ session, setSession, showError }) => {
const [edit, setEdit] = useState(null)
return edit
? (
<Edit
edit={edit}
setEdit={setEdit}
session={session}
setSession={setSession}
showError={showError}
/>
) : (
<List
session={session}
setSession={setSession}
showError={showError}
setEdit={setEdit}
/>
)
}
export default Main
|