Boilerplate logic for votes added in frontend, Header added for post creation

This commit is contained in:
Hollgy 2024-03-18 18:34:11 +01:00
parent 6093751799
commit b7d00d4e75
2 changed files with 9 additions and 3 deletions

View file

@ -40,6 +40,7 @@ export function NewPostInputArea(): JSXElement {
when={!waiting()}
fallback={<span class="loading loading-spinner loading-lg self-center" />}
>
<span>Create a new post</span>
<div class="flex w-full flex-col space-y-2">
<textarea
class="textarea textarea-bordered h-32"

View file

@ -26,13 +26,18 @@ export function PostSegment({ post }: { post: Post }): JSXElement {
</Show>
<p class="break-words text-base-content md:pt-2">{post.content}</p>
<div class="card-actions justify-between">
<div class="flex w-24 space-x-3 space-y-1.5">
<button
// onClick={(engagement)}
class="btn btn-xs hover:border-x-primary"
class="btn btn-xs hover:border-primary"
aria-label="Show sign of engagement"
>
<EngagementIcon />
</button>
<span class="countdown text-1xl">
<span style={{ "--value": 46 }}>{post.votes}</span>
</span>
</div>
<button
onClick={(): void => nav("/post/" + post.id)}
class="btn btn-xs"