Skip to content

Commit

Permalink
fix: Prevent SSR error by conditionally handling access
Browse files Browse the repository at this point in the history
  • Loading branch information
ohprettyhak committed Nov 4, 2024
1 parent 9dfa62d commit 43aed73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/index/ProfileGrid/ProfileDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type ProfileDialogProps = {
const ProfileDialog = ({ children }: ProfileDialogProps) => {
const [open, setOpen] = useState(false);

if (typeof window === 'undefined') return null;

return (
<Dialog.Root open={open} onOpenChange={setOpen}>
<Dialog.Trigger asChild>{children}</Dialog.Trigger>
Expand Down

0 comments on commit 43aed73

Please sign in to comment.