|
|
|
@@ -14,6 +14,7 @@ import useAuth from "hooks/useAuth"; |
|
|
|
import useNavigateCustom from "hooks/useNavigateCustom"; |
|
|
|
import { getPath } from "routes/path"; |
|
|
|
import { PageID } from "pages"; |
|
|
|
import useBackDrop from "hooks/useBackDrop"; |
|
|
|
|
|
|
|
function Copyright() { |
|
|
|
return ( |
|
|
|
@@ -29,6 +30,8 @@ function App() { |
|
|
|
|
|
|
|
const { navigateWhenChanged } = useNavigateCustom(); |
|
|
|
|
|
|
|
const { setShowBackDrop } = useBackDrop(); |
|
|
|
|
|
|
|
const [mobileOpen, setMobileOpen] = useState(false); |
|
|
|
|
|
|
|
const { drawerWidth, innerWidth, contentsWidth } = useDashboard(); |
|
|
|
@@ -37,16 +40,17 @@ function App() { |
|
|
|
setMobileOpen(!mobileOpen); |
|
|
|
}; |
|
|
|
|
|
|
|
console.log("へい"); |
|
|
|
useEffect(() => { |
|
|
|
setShowBackDrop(!initialized); |
|
|
|
if (initialized && !authenticated) { |
|
|
|
navigateWhenChanged(getPath(PageID.PAGE_403)); |
|
|
|
} |
|
|
|
}, [initialized, authenticated]); |
|
|
|
|
|
|
|
if (!initialized) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
if (!authenticated) { |
|
|
|
navigateWhenChanged(getPath(PageID.PAGE_403)); |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
<Box sx={{ display: "flex", minHeight: "100vh" }}> |
|
|
|
<Box |
|
|
|
|