mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-10 03:03:43 +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