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,17 +1,14 @@
import Button from "@/components/ui/Button";
import { withTitle } from "@/constructors/Component";
import { UrlsTitle } from "@/enums/urls";
import { useAppContext } from "@/providers/AuthProvider";
import { FunctionComponent } from "preact";
import { useLocation } from "preact-iso";
import { useEffect } from "preact/hooks";
import classes from "./profile_settings.module.scss";
const ProfileSettings: FunctionComponent = () => {
const { isLoggedIn } = useAppContext();
const { route } = useLocation();
useEffect(() => {
document.title = UrlsTitle.PROFILE;
}, []);
return (
<div class={classes.container}>
<div id={classes.avatar}>Аватар</div>
@@ -42,4 +39,4 @@ const ProfileSettings: FunctionComponent = () => {
);
};
export default ProfileSettings;
export default withTitle(UrlsTitle.PROFILE, ProfileSettings);