Skip to content

Commit 767ed34

Browse files
committed
refactor: post item naming
1 parent 35de7c4 commit 767ed34

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
33
import { motion } from 'framer-motion';
44
import { ArrowRightIcon, FolderIcon } from '@phosphor-icons/react';
55

6-
const PostItem = ({
6+
const BrutalistPostItem = ({
77
post,
88
isActive,
99
onHover = () => {},
@@ -69,7 +69,7 @@ const PostItem = ({
6969
style={{ backgroundColor: categoryColor || 'var(--emerald-400)' }}
7070
/>
7171

72-
<div className="flex flex-1 items-baseline gap-6 pl-4 md:pl-8 min-w-0 pr-12">
72+
<div className="flex flex-1 items-center gap-6 pl-4 md:pl-8 min-w-0 pr-12">
7373
{/* Date */}
7474
<span
7575
className={`font-mono text-[10px] tracking-widest flex-shrink-0 transition-colors duration-300 ${
@@ -80,9 +80,14 @@ const PostItem = ({
8080
</span>
8181

8282
{/* Title Area */}
83-
<div className="flex items-start gap-3 min-w-0 flex-1">
83+
<div className="flex items-center gap-3 min-w-0 flex-1">
8484
{isSeries && (
85-
<FolderIcon size={24} weight="fill" className="text-amber-400 shrink-0 mt-0.5" />
85+
<FolderIcon
86+
size={24}
87+
weight="fill"
88+
className="shrink-0"
89+
style={{ color: categoryColor }}
90+
/>
8691
)}
8792
<div className="flex flex-col gap-1">
8893
<h3
@@ -135,4 +140,4 @@ const PostItem = ({
135140
);
136141
};
137142

138-
export default PostItem;
143+
export default BrutalistPostItem;

src/pages/blog-views/BrutalistBlogPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import { Link } from 'react-router-dom';
33
import { motion, AnimatePresence } from 'framer-motion';
4-
import PostItem from '../../components/PostItem';
4+
import BrutalistPostItem from '../../components/BrutalistPostItem';
55
import GenerativeArt from '../../components/GenerativeArt';
66
import Seo from '../../components/Seo';
77
import { fetchAllBlogPosts } from '../../utils/dataUtils';
@@ -201,7 +201,7 @@ const BrutalistBlogPage = () => {
201201

202202
<div className="flex flex-col pb-32">
203203
{filteredItems.map((item) => (
204-
<PostItem
204+
<BrutalistPostItem
205205
key={item.slug}
206206
post={item}
207207
isActive={activePost?.slug === item.slug}

src/pages/brutalist-views/BrutalistSeriesPage.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import { useParams, Link } from 'react-router-dom';
33
import { motion, AnimatePresence } from 'framer-motion';
4-
import PostItem from '../../components/PostItem';
4+
import BrutalistPostItem from '../../components/BrutalistPostItem';
55
import { ArrowLeftIcon, TagIcon, BookOpenIcon, CalendarIcon } from '@phosphor-icons/react';
66
import Seo from '../../components/Seo';
77
import { fetchAllBlogPosts } from '../../utils/dataUtils';
@@ -118,7 +118,7 @@ const BrutalistSeriesPage = () => {
118118

119119
<div className="flex flex-col pb-32">
120120
{seriesPosts.map((post) => (
121-
<PostItem
121+
<BrutalistPostItem
122122
key={post.slug}
123123
post={{
124124
...post,

0 commit comments

Comments
 (0)