Skip to content

Commit

Permalink
[fix] tsconfig 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
euije committed Mar 4, 2024
1 parent edd460f commit cf8b20c
Show file tree
Hide file tree
Showing 5 changed files with 434 additions and 1,063 deletions.
6 changes: 2 additions & 4 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { Analytics } from '@vercel/analytics/react';
import { SpeedInsights } from '@vercel/speed-insights/next';
import '@/styles/globals.css';
import {
ReactQueryClientProvider,
StyledComponentsRegistry,
} from '@/component/Provider';
import { StyledComponentsRegistry } from '@/component/Provider/StyledComponentsRegistry';
import { ReactQueryClientProvider } from '@/component/Provider/ReactQueryClientProvider';

export const metadata: Metadata = {
title: 'YELL:O - 너의 [ ??? ]에 설렜어',
Expand Down
23 changes: 23 additions & 0 deletions component/Provider/ReactQueryClientProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use client';
import React, { useState } from 'react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

export const ReactQueryClientProvider = ({
children,
}: {
children: React.ReactNode;
}) => {
const [queryClient] = useState(
() =>
new QueryClient({
defaultOptions: {
queries: {
staleTime: 60 * 1000,
},
},
}),
);
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
};
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
'use client';

import React, { useState } from 'react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { useServerInsertedHTML } from 'next/navigation';
import { ServerStyleSheet, StyleSheetManager } from 'styled-components';

export const ReactQueryClientProvider = ({
children,
}: {
children: React.ReactNode;
}) => {
const [queryClient] = useState(
() =>
new QueryClient({
defaultOptions: {
queries: {
staleTime: 60 * 1000,
},
},
}),
);
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
};

export function StyledComponentsRegistry({
children,
}: {
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
],
"incremental": true,
"paths": {
"@/*": ["./*"]
"@/*": ["./*"],
"react": ["./node_modules/@types/react"]
},
"rootDir": "./"
},
Expand Down
Loading

0 comments on commit cf8b20c

Please sign in to comment.