diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-29 18:11:51 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-29 18:11:51 +0100 |
| commit | 7038c517ee9fe4415f17b4b20e39a4c11a934b3c (patch) | |
| tree | 66d7ea0b8b81075f8f76014f43f8fa7e8bfa9435 /src/components/PostsList/PostsList.tsx | |
| parent | 8e0c8c9255ba5ab466d8372fe223efeb5a3f0833 (diff) | |
chore: make year sticky in posts list
Diffstat (limited to 'src/components/PostsList/PostsList.tsx')
| -rw-r--r-- | src/components/PostsList/PostsList.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/PostsList/PostsList.tsx b/src/components/PostsList/PostsList.tsx index da72032..51698e6 100644 --- a/src/components/PostsList/PostsList.tsx +++ b/src/components/PostsList/PostsList.tsx @@ -20,8 +20,8 @@ const PostsList = ({ return years.map((year) => { return ( - <Fragment key={year}> - {showYears && <h2>{year}</h2>} + <section key={year} className={styles.section}> + {showYears && <h2 className={styles.year}>{year}</h2>} <ol className={styles.list}> {posts[year].map((post) => { return ( @@ -31,7 +31,7 @@ const PostsList = ({ ); })} </ol> - </Fragment> + </section> ); }); }; |
