wip add button and feed stuff
This commit is contained in:
parent
38d09a582c
commit
1c2d6d60a6
11 changed files with 211 additions and 46 deletions
|
@ -5,17 +5,7 @@ interface PostsFeedProps {
|
|||
posts: Post[]
|
||||
}
|
||||
|
||||
export function PostsFeed({ posts }: PostsFeedProps) {
|
||||
const formatDate = (date: Temporal.PlainDateTime) => {
|
||||
return date.toLocaleString('en-US', {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
})
|
||||
}
|
||||
|
||||
export default function PostsFeed({ posts }: PostsFeedProps) {
|
||||
return (
|
||||
<div className="flex flex-col gap-6 w-full">
|
||||
{posts.map((post) => (
|
||||
|
@ -36,3 +26,13 @@ export function PostsFeed({ posts }: PostsFeedProps) {
|
|||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function formatDate(date: Temporal.PlainDateTime) {
|
||||
return date.toLocaleString('en-US', {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue