Skip to content

Commit

Permalink
Merge branch 'master' into 조혜진
Browse files Browse the repository at this point in the history
  • Loading branch information
MEGUMMY1 authored Jul 19, 2024
2 parents c750ec8 + c165c3c commit e11fce4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
10 changes: 6 additions & 4 deletions components/NavigationDropdown/NotificationDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function NotificationDropdown({
key={notification.id}
className="flex-col items-center px-[12px] py-[16px] justify-between rounded-[5px] border-b w-[328px] min-h-[120px] m:w-[335px] m:h-[105px] bg-white border-gray-200 dark:bg-var-dark4 "
>
<div className="flex justify-between m:mb-[5px]">
<div className="flex justify-between">
<StatusIndicator
size="small"
status={
Expand All @@ -80,14 +80,16 @@ export default function NotificationDropdown({
: 'denied'
}
/>
<div className="m:hidden h-[24px]">
<div className="h-[24px]">
<CloseButton onClick={() => handleDelete(notification.id)} />
</div>
</div>
<div className="w-[298px] min-h-[44px] mb-[4px]">
<p>{ContentWithHighlights(notification.content)}</p>
{ContentWithHighlights(notification.content)}
</div>
<div className="text-[12px]">
{formatTimeAgo(notification.updatedAt)}
</div>
<p>{formatTimeAgo(notification.updatedAt)}</p>
</div>
))}
{hasNextPage && <div ref={ref} />}
Expand Down
16 changes: 15 additions & 1 deletion pages/mypage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
import MyPageInput from '@/components/MyPageInput/MyPageInput';
import SidenNavigation from '@/components/SideNavigation/SideNavigation';
import SidenNavigationMobile from '@/components/SideNavigation/SideNavigationMobile';
import useLoginState from '@/hooks/useLoginState';
import { useSideNavigation } from '@/hooks/useSideNavigation';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { useEffect } from 'react';

export default function MyPage() {
const route = useRouter();
const { isLoggedIn } = useLoginState();
const { isOpen } = useSideNavigation();

useEffect(() => {
if (!isLoggedIn) {
route.push('/login');
}
}, [isLoggedIn, route]);

if (!isLoggedIn) {
return null;
}

return (
<>
<div
Expand Down

0 comments on commit e11fce4

Please sign in to comment.