Skip to content

Commit 8241a11

Browse files
committed
feat: integrate ProgressProvider and QueryClientProvider in layout, update header styles, and add new dependencies
1 parent 59bc02d commit 8241a11

File tree

5 files changed

+64
-2
lines changed

5 files changed

+64
-2
lines changed

apps/spectator/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
]
1717
},
1818
"dependencies": {
19+
"@bprogress/next": "^3.2.12",
20+
"@hcc/api-base": "workspace:*",
1921
"@hcc/icons": "workspace:*",
2022
"next": "^15.4.5",
2123
"react": "^19.1.1",

apps/spectator/src/app/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { Metadata } from 'next';
22
import type { PropsWithChildren } from 'react';
33
import { Layout } from '~/components/layout';
44
import { Pretendard } from './_fonts';
5+
import { Provider } from './provider';
56
import '~/styles/globals.css';
67

78
export const metadata: Metadata = {
@@ -13,7 +14,9 @@ const RootLayout = ({ children }: PropsWithChildren) => {
1314
return (
1415
<html lang="ko">
1516
<body className={Pretendard.className}>
16-
<Layout>{children}</Layout>
17+
<Provider>
18+
<Layout>{children}</Layout>
19+
</Provider>
1720
</body>
1821
</html>
1922
);

apps/spectator/src/app/provider.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use client';
2+
3+
import { ProgressProvider } from '@bprogress/next/app';
4+
import { QueryClientProvider } from '@hcc/api-base';
5+
import type { PropsWithChildren } from 'react';
6+
7+
export const Provider = ({ children }: PropsWithChildren) => {
8+
return (
9+
<QueryClientProvider>
10+
<ProgressProvider
11+
color="var(--color-primary-500)"
12+
options={{ showSpinner: false }}
13+
shallowRouting={false}
14+
>
15+
{children}
16+
</ProgressProvider>
17+
</QueryClientProvider>
18+
);
19+
};

apps/spectator/src/components/layout/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Link from 'next/link';
33

44
export const Header = () => {
55
return (
6-
<header className="center sticky top-0 z-header h-[44px] w-full border-neutral-50 border-b">
6+
<header className="center sticky top-0 z-header h-[44px] w-full border-neutral-100 border-b">
77
<Link href="/">
88
<HCCLogo width="71.5" height="21" className="text-primary-500" />
99
</Link>

pnpm-lock.yaml

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)