mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: remove mobile styles
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { useContext, useEffect } from "react";
|
||||
import { useContext } from "react";
|
||||
import appContext from "./stores/appContext";
|
||||
import { appRouterSwitch } from "./routers";
|
||||
import { globalStateService } from "./services";
|
||||
import "./less/app.less";
|
||||
|
||||
function App() {
|
||||
@ -9,20 +8,6 @@ function App() {
|
||||
locationState: { pathname },
|
||||
} = useContext(appContext);
|
||||
|
||||
useEffect(() => {
|
||||
const handleWindowResize = () => {
|
||||
globalStateService.setIsMobileView(document.body.clientWidth <= 875);
|
||||
};
|
||||
|
||||
handleWindowResize();
|
||||
|
||||
window.addEventListener("resize", handleWindowResize);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("resize", handleWindowResize);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return <>{appRouterSwitch(pathname)}</>;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user