articles list reader animation
Some checks failed
/ image_build (push) Failing after 3m17s

This commit is contained in:
tymur999
2026-03-16 06:19:53 -04:00
parent 96834072af
commit 2c34229cc0
6 changed files with 89 additions and 19 deletions

View File

@@ -1,17 +1,9 @@
import {Article} from "./articles";
import allBlack from "../img/IMG_3095.jpg";
import {lazy, useState} from "react";
import {Article, ARTICLES} from "./articles";
import {useState} from "react";
import "./list.sass";
import {ReactComponent as BoxSvg} from "../img/blog-box.svg";
import {Reader} from "./Reader";
const ARTICLES: Article[] = [{
name: "My high school experience",
description: "My first program, winning two senior superlatives, and why (and how) I chose Georgia Tech",
thumbnail: allBlack,
published: new Date(),
article: lazy(() => import("../about/About.mdx"))
}];
export function ArticlesList() {
const [reading, setReading] = useState<Article | null>(null);
@@ -21,14 +13,12 @@ export function ArticlesList() {
<section className="articles">
{
ARTICLES.map(a =>
<BlogBox article={a} setReading={setReading}/>
<BlogBox key={a.name} article={a} setReading={setReading}/>
)
}
{
reading && <Reader {...reading}/>
}
</section>
<section className="spacer"/>
<Reader post={reading} setPost={setReading} />
</main>
}