Skip to content

Commit

Permalink
feat: 네비게이션 스키마 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
hanyugeon committed Jul 11, 2024
1 parent d4054a1 commit 98fa30f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import type { Metadata } from 'next';

import { appleSplashScreens } from '@/constants/metadata';
import {
appleSplashScreens,
navigationSchemaItems,
} from '@/constants/metadata';

import GoogleAnalytics from '@/components/common/GoogleAnalytics';
import AuthFailedErrorBoundary from '@/components/common/AuthFailedErrorBoundary';
Expand Down Expand Up @@ -38,6 +41,12 @@ export const metadata: Metadata = {
},
};

const navigationSchema = {
'@context': 'https://schema.org',
'@type': 'ItemList',
itemListElement: navigationSchemaItems,
};

const RootLayout = ({ children }: { children: React.ReactNode }) => {
return (
<html lang="ko">
Expand All @@ -52,6 +61,10 @@ const RootLayout = ({ children }: { children: React.ReactNode }) => {
</ReactQueryProvider>
</ToastProvider>
</PWAServiceWorkerProvider>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(navigationSchema) }}
/>
</body>
</html>
);
Expand Down

0 comments on commit 98fa30f

Please sign in to comment.