aboutsummaryrefslogtreecommitdiff
path: root/src/components/Post.astro
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-10-24 23:19:33 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-10-24 23:19:33 +0300
commit9dfd6aa77518b3a1e6bfd926a3b7719c32a8c97f (patch)
treed10fc76ef816160871e3955aa75821bc5d5088d4 /src/components/Post.astro
parent4ca81621e5b31922565b4149ebad1deb5161071a (diff)
use the new api
Diffstat (limited to 'src/components/Post.astro')
-rw-r--r--src/components/Post.astro9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/components/Post.astro b/src/components/Post.astro
index 6805846..1aa7a0d 100644
--- a/src/components/Post.astro
+++ b/src/components/Post.astro
@@ -1,27 +1,24 @@
---
-import { creatorColor, formatTime } from '../lib/util';
+import { formatTime } from '../lib/util';
export interface Props {
id: string;
date: number;
- creator: string;
box: string;
board: string
}
-const { id, date, creator, box, board = '' } = Astro.props;
+const { id, date, box, board = '' } = Astro.props;
---
<div class={box} id={id}>
<span style="line-height: 2rem;">
{(board != '') ? (
<a href=`/board/${board}/${id}` style="font-family: mono">{id}</a>
) : (
- <span style="font=family: mono">{id}</span>
+ <span style="font-family: mono">{id}</span>
)}
at {formatTime(date)} <br>
- -> <span style=`${creatorColor(creator)}; font-family: mono`>
- {creator}
</span> <br>
</span> <hr>
<slot />