Skip to content

Commit

Permalink
dialogからjQueryを剥がす
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 committed Mar 24, 2024
1 parent d2f07e0 commit 594573d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions workspaces/app/src/foundation/atoms/DialogContentAtom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { atom } from 'jotai';
import $ from 'jquery';

const StateAtom = atom<JSX.Element | null>(null);

Expand All @@ -11,9 +10,9 @@ export const DialogContentAtom = atom(
const isOpen = content != null;

if (isOpen) {
$('body').css('overflow', 'hidden');
document.body.style.overflow = 'hidden';
} else {
$('body').css('overflow', 'scroll');
document.body.style.overflow = 'scroll';
}

set(StateAtom, content);
Expand Down

0 comments on commit 594573d

Please sign in to comment.