AL
Size: a a a
AL
ЮЧ
return (
<IsAuthenticated>{yes => yes ? <Page /> : <Authenticate />}</IsAuthenticated>
)
ЮЧ
IsAuthenticated
уже делайте все запросы, все что нужно.ЮЧ
const IsAuthenticated = ({children}) => {
const [yes, setYes] = useState(false)
useEffect(() => {
// Здесь все запросы идут
}, [])
return children(yes)
}
AL
const IsAuthenticated = ({children}) => {
const [yes, setYes] = useState(false)
useEffect(() => {
// Здесь все запросы идут
}, [])
return children(yes)
}
AL
ЮЧ
ЮЧ
ЮЧ
ЮЧ
ЮЧ
ЮЧ
AL
ЮЧ
ЮЧ
AL
ЮЧ
AL
ЮЧ