This commit is contained in:
Виталий Лавшонок
2025-10-30 20:43:01 +03:00
parent 5ef7933446
commit 99018537c5
21 changed files with 518 additions and 42 deletions

View File

@@ -1,23 +1,22 @@
import { useEffect } from "react";
import { SecondaryButton } from "../../../components/button/SecondaryButton";
import ArticleItem, { ArticleItemProps } from "./ArticleItem";
import { useAppDispatch } from "../../../redux/hooks";
import ArticleItem from "./ArticleItem";
import { setMenuActivePage } from "../../../redux/slices/store";
export interface Problem {
export interface Article {
id: number;
authorId: number;
name: string;
difficulty: "Easy" | "Medium" | "Hard";
tags: string[];
timeLimit: number;
memoryLimit: number;
createdAt: string;
updatedAt: string;
}
const Articles = () => {
const articles: ArticleItemProps[] = [
const dispatch = useAppDispatch();
const articles: Article[] = [
{
"id": 1,
"name": "Todo List App",
@@ -130,6 +129,9 @@ const Articles = () => {
}
];
useEffect(() => {
dispatch(setMenuActivePage("articles"))
}, []);
return (
<div className=" h-full w-full box-border p-[20px] pt-[20px]">
@@ -137,7 +139,7 @@ const Articles = () => {
<div className="relative flex items-center mb-[20px]">
<div className="h-[50px] text-[40px] font-bold text-liquid-white flex items-center">
База статей
Статьи
</div>
<SecondaryButton
onClick={() => { }}