Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Collection50 committed Sep 5, 2024
1 parent 0f0f8d2 commit 8df5f13
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
16 changes: 9 additions & 7 deletions src/app/AuthRedirect.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Redirect condition={accessToken == null || isJobSelection == null} to="/login">
{children}
</Redirect>
);
if (accessToken == null || isJobSelection == null) {
cookies().delete(ACCESS_TOKEN);
cookies().delete(JOB_SELECTION);
redirect('/login');
}

return { children };
}
18 changes: 12 additions & 6 deletions src/styles/editors/lists.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/styles/editors/placeholder.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8df5f13

Please sign in to comment.