Skip to content

Commit a39f354

Browse files
committed
fix: Resolve z-index issue of toast message
해결: #28
1 parent d11f8b4 commit a39f354

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

src/content/App.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ export default function App() {
149149
}));
150150
};
151151

152+
useEffect(() => {
153+
if (isOpen) {
154+
document.body.style.overflow = 'hidden';
155+
} else {
156+
document.body.style.overflow = '';
157+
}
158+
159+
return () => {
160+
document.body.style.overflow = '';
161+
};
162+
}, [isOpen]);
163+
152164
return (
153165
<>
154166
<PendingDialogWithBeforeUnload isPending={isPending} onClose={() => {}} />

src/content/components/Assignment.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default function Assignment({ courseData }: Props) {
6262
paddingLeft: '4px',
6363
paddingRight: '4px',
6464
clipPath: 'inset(0 0 0 0);',
65+
zIndex: '9999',
6566
}}
6667
>
6768
{calculateRemainingTime(course.dueDate)}

src/content/components/QuizTab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default function QuizTab({ courseData }: Props) {
6161
paddingBottom: '1px',
6262
paddingLeft: '4px',
6363
paddingRight: '4px',
64+
zIndex: '9999',
6465
}}
6566
>
6667
{calculateRemainingTime(course.dueDate)}

src/content/components/Video.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export default function Video({ courseData }: Props) {
128128
paddingBottom: '1px',
129129
paddingLeft: '4px',
130130
paddingRight: '4px',
131+
zIndex: '9999',
131132
}}
132133
>
133134
{calculateRemainingTimeByRange(vods[0].range)}

0 commit comments

Comments
 (0)