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,7 +1,8 @@
import Task from "@/components/task";
import { withTitle } from "@/constructors/Component";
import { UrlsTitle } from "@/enums/urls";
import { FunctionComponent } from "preact";
import { useEffect, useMemo } from "preact/hooks";
import { useMemo } from "preact/hooks";
import classes from "./profile_tasks.module.scss";
const example_tasks = ["Test 1", "Test 2", "Test 3", "Test 4", "Test 5", "Test 6", "Test 7", "Test 8"];
@@ -12,9 +13,6 @@ const ProfileTasks: FunctionComponent = () => {
const formatter = new Intl.DateTimeFormat("ru-RU", { month: "long", day: "numeric" });
return formatter.format(date);
}, []);
useEffect(() => {
document.title = UrlsTitle.TASKS;
}, []);
return (
<div class={classes.container}>
<div class={classes.header}>Сегодня: {getDate}</div>
@@ -27,4 +25,4 @@ const ProfileTasks: FunctionComponent = () => {
);
};
export default ProfileTasks;
export default withTitle(UrlsTitle.TASKS, ProfileTasks);