mirror of
https://github.com/ChatGPTNextWeb/NextChat.git
synced 2026-03-04 07:48:05 +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