Skip to content

Commit

Permalink
feat(font): 폰트 설정 (#61)
Browse files Browse the repository at this point in the history
* feat

* Fix
  • Loading branch information
Collection50 authored Aug 30, 2024
1 parent 9b1b198 commit 0fc6159
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
Binary file added src/app/fonts/PretendardVariable.woff2
Binary file not shown.
10 changes: 7 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import type { Metadata } from 'next';
import { QueryProvider } from '@/lib';
import '@/styles/globals.css';
import '@/styles/memo.css';
import { Inter } from 'next/font/google';
import { cn } from '@/utils';
import { Suspense } from 'react';
import { GoogleProvider } from '@/lib/GoogleProvider';
import localFont from 'next/font/local';

const inter = Inter({ subsets: ['latin'] });
const Pretendard = localFont({
src: './fonts/PretendardVariable.woff2',
display: 'swap',
weight: '45 920',
});

export const metadata: Metadata = {
title: '뽀각',
Expand All @@ -24,7 +28,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body className={cn(inter.className, 'bg-neutral-1')}>
<body className={cn(Pretendard.className, 'bg-neutral-1')}>
<QueryProvider>
<GoogleProvider>
<Suspense>{children}</Suspense>
Expand Down
3 changes: 2 additions & 1 deletion src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import { ACCESS_TOKEN, JOB_SELECTION, SELECT } from './constants/token';
export default function Page() {
const Funnel = useFunnel(['login', 'select'] as const, { initialStep: 'login', stepQueryKey: 'auth' });
const isSelectJob = getCookie(JOB_SELECTION) === SELECT;
const accessToken = getCookie(ACCESS_TOKEN);

return (
<Funnel mode="wait">
<Funnel.Step name="login">
<Redirect condition={!isSelectJob} to="/login?auth=select">
<Redirect condition={accessToken != null && !isSelectJob} to="/login?auth=select">
<Login />
</Redirect>
</Funnel.Step>
Expand Down
23 changes: 16 additions & 7 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@
}

body {
/* color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb)); */
font-family:
'Pretendard Variable',
Pretendard,
-apple-system,
BlinkMacSystemFont,
system-ui,
Roboto,
'Helvetica Neue',
'Segoe UI',
'Apple SD Gothic Neo',
'Noto Sans KR',
'Malgun Gothic',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
sans-serif;
}

@layer utilities {
Expand Down

0 comments on commit 0fc6159

Please sign in to comment.