Projekt

Obecné

Profil

Stáhnout (771 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 ddc84a2f Schwobik
import { useDispatch } from "react-redux"
2
import { useEffect } from "react"
3
import { AppDispatch } from "../stores/store"
4
import { Heading, HStack, Spinner } from "native-base"
5
import { logout } from "../stores/reducers/userSlice"
6
7
const Logout = () => {
8
    const dispatch = useDispatch<AppDispatch>();
9
10
    useEffect(() => {
11
        dispatch(logout())
12
    }, [dispatch])
13
14
    return (
15
        <>
16
            <HStack space={2} justifyContent="center">
17
                <Spinner
18
                    accessibilityLabel="Loading logout"
19
                    color="primary.50"
20
                />
21
                <Heading color="primary.50" fontSize="md">
22
                    Loading
23
                </Heading>
24
            </HStack>
25
        </>
26
    )
27
}
28
29
export default Logout