feat: profile tasks page
This commit is contained in:
26
src/pages/profile_tasks.tsx
Normal file
26
src/pages/profile_tasks.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user