Fix
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
import React, { useState, useCallback, useContext, createContext } from 'react';
|
import React, { useState, useCallback, useContext, createContext } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import { motion, AnimatePresence } from 'framer-motion';
|
import { motion, AnimatePresence } from 'framer-motion';
|
||||||
@@ -84,6 +86,7 @@ function SheetTrigger(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function SheetPortal({ children }: { children: React.ReactNode }) {
|
function SheetPortal({ children }: { children: React.ReactNode }) {
|
||||||
|
if (typeof document === 'undefined') return null;
|
||||||
return createPortal(children, document.body);
|
return createPortal(children, document.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user