feat: withTitle modif
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user