diff --git a/src/app/(AppBarHeader)/toks-main/_components/SkeletonCard.tsx b/src/app/(AppBarHeader)/toks-main/_components/SkeletonCard.tsx new file mode 100644 index 00000000..1284341a --- /dev/null +++ b/src/app/(AppBarHeader)/toks-main/_components/SkeletonCard.tsx @@ -0,0 +1,56 @@ +import clsx from 'clsx'; +import React from 'react'; + +import { Skeleton } from '@/common/components/Skeleton'; + +type Props = { + quizType?: 'ox' | 'default'; +}; + +export const SkeletonCardList = () => { + return ( +
+ + + + + + +
+ ); +}; + +const SkeletonCard = ({ quizType = 'default' }: Props) => { + return ( +
+
+
+
+ + +
+
+
+ + + +
+ +
+
+ {quizType === 'ox' ? ( + <> + + + + ) : ( + + )} +
+
+ ); +}; diff --git a/src/common/components/Skeleton.tsx b/src/common/components/Skeleton.tsx new file mode 100644 index 00000000..93f546a1 --- /dev/null +++ b/src/common/components/Skeleton.tsx @@ -0,0 +1,13 @@ +import { ClassNameValue, twMerge } from 'tailwind-merge'; + +type Props = { + className?: ClassNameValue; +}; + +export const Skeleton = ({ className }: Props) => { + return ( +
+ ); +}; diff --git a/src/common/providers/index.tsx b/src/common/providers/index.tsx index 3e87deaf..1587736f 100644 --- a/src/common/providers/index.tsx +++ b/src/common/providers/index.tsx @@ -5,6 +5,7 @@ import { QueryClient, QueryClientProvider, } from '@tanstack/react-query'; +import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { PropsWithChildren, useState } from 'react'; import { RecoilRoot } from 'recoil'; @@ -33,6 +34,9 @@ export default function RootProvider({ children }: PropsWithChildren) { {children} + ); } diff --git a/src/queries/useQuizListInfinityQuery/index.ts b/src/queries/useQuizListInfinityQuery/index.ts index 41b2cb38..a50bce89 100644 --- a/src/queries/useQuizListInfinityQuery/index.ts +++ b/src/queries/useQuizListInfinityQuery/index.ts @@ -1,3 +1,4 @@ +'use client'; import { useInfiniteQuery } from '@tanstack/react-query'; import { useRecoilValue } from 'recoil';