Skip to content

Commit b314daf

Browse files
committed
Logs page.
1 parent f64f0d6 commit b314daf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/LogCard.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ const categoryStyles = {
3232
},
3333
};
3434

35-
const LogCard = ({ log }) => {
35+
const LogCard = ({ log, index, totalLogs }) => {
3636
const { title, category, author, director, platform, source, artist, link, date, rating } = log;
3737

3838
const cardStyle = categoryStyles[category] || {};
3939

4040
return (
4141
<div
42-
className="bg-transparent border rounded-lg shadow-lg p-6 flex flex-col justify-between"
42+
className="bg-transparent border rounded-lg shadow-lg p-6 flex flex-col justify-between relative"
4343
style={cardStyle}
4444
>
45+
<div className="absolute top-2 right-2 text-gray-400 text-lg font-semibold">#{totalLogs - index}</div>
4546
<div>
4647
<div className="flex items-center justify-between mb-4">
4748
<div className="flex items-center">

src/pages/LogsPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const LogsPage = () => {
2929
<hr className="border-gray-700 mb-8" />
3030
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
3131
{logs.map((log, index) => (
32-
<LogCard key={index} log={log} />
32+
<LogCard key={index} log={log} index={index} totalLogs={logs.length} />
3333
))}
3434
</div>
3535
<ColorLegends />

0 commit comments

Comments
 (0)