re-implemented JWT auth

This commit is contained in:
lnn0q 2025-04-18 14:47:42 +03:00
parent c190d368de
commit b47b0f3752
18 changed files with 390 additions and 174 deletions

View file

@ -1,4 +1,4 @@
import { Stack, Text } from '@chakra-ui/react';
import { Box, Button, Stack, Text } from '@chakra-ui/react';
import { createFileRoute } from '@tanstack/react-router';
import { gql, useQuery } from '@apollo/client';
@ -10,7 +10,7 @@ export const Route = createFileRoute('/')({
});
function Index() {
const { data } = useQuery<BooksManyQuery>(getBooksQuery);
const { data, refetch } = useQuery<BooksManyQuery>(getBooksQuery);
return (
<Stack>
@ -27,6 +27,9 @@ function Index() {
))}
</>
)}
<Box>
<Button onClick={async () => refetch()}>Refetch</Button>
</Box>
</Stack>
</Stack>
);