move folders etc, need to solve app import issue
This commit is contained in:
18
src/component/buttons/sign-out.tsx
Normal file
18
src/component/buttons/sign-out.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from "react";
|
||||
import { Button } from "react-native";
|
||||
import { handleSignOut } from "../../auth";
|
||||
import { useAuthHeader } from "../../graphql/client";
|
||||
|
||||
export default function SignOutButton(): React.JSX.Element {
|
||||
const { setAuthHeader } = useAuthHeader();
|
||||
|
||||
return (
|
||||
<Button
|
||||
title={"Sign out"}
|
||||
onPress={async () => {
|
||||
setAuthHeader({ key: "Authorization", value: "" });
|
||||
await handleSignOut();
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user