feat: withTitle modif

This commit is contained in:
2025-04-15 11:23:48 +03:00
parent db9132de4d
commit b2feaac3e1
6 changed files with 24 additions and 25 deletions

View File

@@ -1,15 +1,12 @@
import Button from "@/components/ui/Button";
import { withTitle } from "@/constructors/Component";
import { UrlsTitle } from "@/enums/urls";
import { FunctionComponent } from "preact";
import { useLocation } from "preact-iso";
import { useEffect } from "preact/hooks";
import classes from "./404.module.scss";
const Page404: FunctionComponent = () => {
const { route } = useLocation();
useEffect(() => {
document.title = UrlsTitle.PAGE404;
}, []);
return (
<div id={classes.container}>
<div id={classes.main_container}>
@@ -27,4 +24,4 @@ const Page404: FunctionComponent = () => {
);
};
export default Page404;
export default withTitle(UrlsTitle.PAGE404, Page404);