Boilerplate logic for votes added in frontend, Header added for post creation
This commit is contained in:
		
							parent
							
								
									6093751799
								
							
						
					
					
						commit
						b7d00d4e75
					
				
					 2 changed files with 9 additions and 3 deletions
				
			
		|  | @ -40,6 +40,7 @@ export function NewPostInputArea(): JSXElement { | ||||||
|       when={!waiting()} |       when={!waiting()} | ||||||
|       fallback={<span class="loading loading-spinner loading-lg self-center" />} |       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"> |       <div class="flex w-full flex-col space-y-2"> | ||||||
|         <textarea |         <textarea | ||||||
|           class="textarea textarea-bordered h-32" |           class="textarea textarea-bordered h-32" | ||||||
|  |  | ||||||
|  | @ -26,13 +26,18 @@ export function PostSegment({ post }: { post: Post }): JSXElement { | ||||||
|         </Show> |         </Show> | ||||||
|         <p class="break-words text-base-content md:pt-2">{post.content}</p> |         <p class="break-words text-base-content md:pt-2">{post.content}</p> | ||||||
|         <div class="card-actions justify-between"> |         <div class="card-actions justify-between"> | ||||||
|  |           <div class="flex w-24 space-x-3 space-y-1.5"> | ||||||
|           <button |           <button | ||||||
|             // onClick={(engagement)}
 |             // onClick={(engagement)}
 | ||||||
|             class="btn btn-xs hover:border-x-primary" |             class="btn btn-xs hover:border-primary" | ||||||
|             aria-label="Show sign of engagement" |             aria-label="Show sign of engagement" | ||||||
|             > |             > | ||||||
|             <EngagementIcon /> |             <EngagementIcon /> | ||||||
|           </button> |           </button> | ||||||
|  |             <span class="countdown text-1xl"> | ||||||
|  |               <span style={{ "--value": 46 }}>{post.votes}</span> | ||||||
|  |             </span> | ||||||
|  |             </div> | ||||||
|           <button |           <button | ||||||
|             onClick={(): void => nav("/post/" + post.id)} |             onClick={(): void => nav("/post/" + post.id)} | ||||||
|             class="btn btn-xs" |             class="btn btn-xs" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Hollgy
						Hollgy