From 8df5f13a43234b69120befad4182bc6cc2a585d7 Mon Sep 17 00:00:00 2001 From: Collection50 Date: Thu, 5 Sep 2024 23:59:05 +0900 Subject: [PATCH] fix --- src/app/AuthRedirect.tsx | 16 +++++++++------- src/styles/editors/lists.css | 18 ++++++++++++------ src/styles/editors/placeholder.css | 3 --- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/app/AuthRedirect.tsx b/src/app/AuthRedirect.tsx index 3e9d8517..53991f4d 100644 --- a/src/app/AuthRedirect.tsx +++ b/src/app/AuthRedirect.tsx @@ -1,15 +1,17 @@ -import { Redirect } from '@/components/Redirect'; -import { StrictPropsWithChildren } from '@/types'; import { cookies } from 'next/headers'; import { ACCESS_TOKEN, JOB_SELECTION } from './login/constants/token'; +import { redirect } from 'next/navigation'; +import type { StrictPropsWithChildren } from '@/types'; export default async function AuthRedirect({ children }: StrictPropsWithChildren) { const accessToken = cookies().get(ACCESS_TOKEN)?.value; const isJobSelection = cookies().get(JOB_SELECTION)?.value; - return ( - - {children} - - ); + if (accessToken == null || isJobSelection == null) { + cookies().delete(ACCESS_TOKEN); + cookies().delete(JOB_SELECTION); + redirect('/login'); + } + + return { children }; } diff --git a/src/styles/editors/lists.css b/src/styles/editors/lists.css index 335a3b8a..bd1b9ecd 100644 --- a/src/styles/editors/lists.css +++ b/src/styles/editors/lists.css @@ -28,25 +28,31 @@ } ul[data-type='taskList'] { - @apply list-none p-0 ml-80; + list-style: none; + padding: 0; + margin-left: 80px !important; p { - @apply m-0; + margin: 0 !important; } li { - @apply flex; + display: flex !important; > label { - @apply grow-0 shrink-0 flex-auto select-none mt-3 mr-5; + flex-grow: 0 !important; + flex-shrink: 0 !important; + user-select: none !important; + margin-top: 3px !important; + margin-right: 5px !important; } > div { - @apply flex-auto; + display: flex !important; } &[data-checked='true'] { - @apply line-through; + text-decoration: line-through !important; } } } diff --git a/src/styles/editors/placeholder.css b/src/styles/editors/placeholder.css index 4bd5f02f..238e767d 100644 --- a/src/styles/editors/placeholder.css +++ b/src/styles/editors/placeholder.css @@ -16,9 +16,6 @@ } /* Default Placeholder */ - & > .is-editor-empty::before { - content: ' / 를 입력하여 옵션 선택'; - } /* Blockquote Placeholder */ blockquote .is-empty:not(.is-editor-empty):first-child:last-child::before {