Skip to content

Commit

Permalink
feat: 🛠️ testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MuttakinHasib committed Dec 13, 2023
1 parent 808373f commit 6b7e524
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions apps/web/src/app/(account)/dashboard/address-book/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ export const metadata = {
};

const AddressBookPage = async () => {
const cookie = getCookieString('connect.sid');
const queryClient = new QueryClient();
// const cookie = getCookieString('connect.sid');
// const queryClient = new QueryClient();

await queryClient.prefetchQuery({
queryKey: ['addresses'],
queryFn: async () =>
await fetch(`${baseURL}${ADDRESSES_ROUTE}`, {
credentials: 'include',
headers: { cookie },
}),
});
// await queryClient.prefetchQuery({
// queryKey: ['addresses'],
// queryFn: async () =>
// await fetch(`${baseURL}${ADDRESSES_ROUTE}`, {
// credentials: 'include',
// headers: { cookie },
// }),
// });

return <AddressBookScreen />;
};
Expand Down
20 changes: 10 additions & 10 deletions apps/web/src/app/(account)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import { QueryClient } from '@tanstack/react-query';
import React, { PropsWithChildren } from 'react';

const AccountLayout = async (props: PropsWithChildren) => {
const cookie = getCookieString('connect.sid');
const queryClient = new QueryClient();
// const cookie = getCookieString('connect.sid');
// const queryClient = new QueryClient();

await queryClient.prefetchQuery({
queryKey: ['me'],
queryFn: async () =>
await fetch(`${baseURL}/users/me`, {
credentials: 'include',
headers: { cookie },
}),
});
// await queryClient.prefetchQuery({
// queryKey: ['me'],
// queryFn: async () =>
// await fetch(`${baseURL}/users/me`, {
// credentials: 'include',
// headers: { cookie },
// }),
// });

return (
<div className="bg-gray-100">
Expand Down

1 comment on commit 6b7e524

@vercel
Copy link

@vercel vercel bot commented on 6b7e524 Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.