mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-20 18:55:13 +08:00
feat: seperate chat page
This commit is contained in:
12
app/hooks/useMobileScreen.ts
Normal file
12
app/hooks/useMobileScreen.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useLayoutEffect } from "react";
|
||||
import { useWindowSize } from "../utils";
|
||||
|
||||
export const MOBILE_MAX_WIDTH = 600;
|
||||
|
||||
export default function useMobileScreen() {
|
||||
const { width } = useWindowSize();
|
||||
|
||||
const isMobile = width <= MOBILE_MAX_WIDTH;
|
||||
|
||||
return isMobile;
|
||||
}
|
Reference in New Issue
Block a user