Skip to content

Commit

Permalink
fix: 알림 스크롤 바 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
comolove committed Oct 22, 2023
1 parent a955f53 commit ab21905
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/components/shared/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Notification } from '@/types/notification';
import RelativeDate from './RelativeDate';
import { checkNotifications } from '@/service/notification';
import { FaRankingStar } from 'react-icons/fa6';
import '@/styles/headerScrollbar.css';

type Props = {
isLogin: boolean;
Expand Down Expand Up @@ -136,7 +137,7 @@ export default function Header({
/>
</button>
<ul
className={`absolute top-8 max-h-[300px] overflow-y-scroll min-w-[300px] bg-white rounded-xl shadow-xl -translate-x-1/2 ${
className={`absolute top-8 max-h-[300px] overflow-auto scroll-p-0 min-w-[300px] bg-white rounded-xl shadow-xl -translate-x-1/2 scroll-remove ${
scrollDirection === 'down' && 'opacity-0 invisible'
} ${isNotificationActive ? 'visible' : 'hidden'}`}
>
Expand All @@ -147,7 +148,7 @@ export default function Header({

return (
<li key={notification.id.toString()}>
<div className="flex justify-between p-2 text-xs border-t border-gray-300">
<div className="flex justify-between px-2 py-1 text-xs border-t border-gray-300">
<span
className="inline-flex items-center gap-2 cursor-pointer hover:text-soma-blue-40"
onClick={() =>
Expand Down
3 changes: 2 additions & 1 deletion src/service/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export async function checkUser(
? {
next: { revalidate: 0 },
headers: {
Cookie: `${cookie}`,
// Cookie: `${cookie}`,
Cookie: 'accessToken=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2OTgiLCJhdXRoIjoiIiwiZXhwIjoxNjk3OTY1NzQ2fQ.YprOQA6U0ppQKv7hCYlDW8kR6KpX0kmREQX24DgaDYfhFT6UoRWvZ_hsH8Ki_LZG4VkrdODar_NohDr09kP6Ig'
},
}
: {
Expand Down
3 changes: 2 additions & 1 deletion src/service/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export async function getNotificationsTop30(
{
next: { revalidate: 0 },
headers: {
Cookie: `${cookie}`,
// Cookie: `${cookie}`,
Cookie: 'accessToken=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2OTgiLCJhdXRoIjoiIiwiZXhwIjoxNjk3OTY1NzQ2fQ.YprOQA6U0ppQKv7hCYlDW8kR6KpX0kmREQX24DgaDYfhFT6UoRWvZ_hsH8Ki_LZG4VkrdODar_NohDr09kP6Ig'
},
}
)
Expand Down
3 changes: 3 additions & 0 deletions src/styles/headerScrollbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.scroll-remove::-webkit-scrollbar {
display: none;
}

0 comments on commit ab21905

Please sign in to comment.