feat(monorepo): migrate to typescript monorepo

This commit is contained in:
2025-11-07 17:09:29 +02:00
committed by BernardNganduDev
parent 3e09956f05
commit 075a388ccb
745 changed files with 2341 additions and 5082 deletions
@@ -0,0 +1,35 @@
import { ActivityIndicator } from "react-native";
import { Button, YStack } from "tamagui";
import { useLogout } from "@/api/request/identity-and-access/login";
import { useAuth } from "@/providers/auth-provider";
import { ScreenView } from "@/ui/components/layout";
export default function Index() {
const authState = useAuth();
const { mutate, isPending } = useLogout();
const handleLogout = async () => {
mutate(undefined, {
onSuccess: () => authState.logout(),
onError: () => authState.logout(),
});
};
return (
<ScreenView>
<ScreenView.Heading title="Paramètres" />
<YStack width="100%">
<Button
disabled={isPending}
onPress={handleLogout}
theme={isPending ? "disabled" : "accent"}
fontWeight="bold"
>
{isPending ? <ActivityIndicator /> : "Déconnexion"}
</Button>
</YStack>
</ScreenView>
);
}