feat: profile tasks page

This commit is contained in:
2025-04-07 13:03:11 +03:00
parent b9efdef024
commit 6a6b8091c7
3 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
import Task from "@/components/task";
import { FunctionComponent } from "preact";
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"];
const ProfileTasks: FunctionComponent = () => {
const getDate = useMemo(() => {
const date = new Date();
const formatter = new Intl.DateTimeFormat("ru-RU", { month: "long", day: "numeric" });
return formatter.format(date);
}, []);
return (
<div class={classes.container}>
<div class={classes.header}>Сегодня: {getDate}</div>
<div class={classes.tasks_container}>
{example_tasks.map((task, index) => (
<Task name={task} key={index} />
))}
</div>
</div>
);
};
export default ProfileTasks;