mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 11:36:38 +08:00
fix error: window not defined
This commit is contained in:
parent
63544300f5
commit
ebf0081cc1
@ -159,7 +159,7 @@ function _Home() {
|
|||||||
useSwitchTheme();
|
useSwitchTheme();
|
||||||
|
|
||||||
// the two useEffects are for enable animation of the sidebar collapse in mobile screen
|
// the two useEffects are for enable animation of the sidebar collapse in mobile screen
|
||||||
const [width, setWidth] = useState(window.innerWidth);
|
const [width, setWidth] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleResize = () => {
|
const handleResize = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user