From c89a2170a4b50afeed4b0e66977146d1a94afedb Mon Sep 17 00:00:00 2001 From: Hunter Chang <716376+ChangoMan@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:01:37 +0800 Subject: [PATCH] style: Style admin rating stars. Add count to tabs. (#68) --- .../app/admin/_components/SubmissionCard.tsx | 31 +++++++++++-------- .../admin/_components/SubmissionComments.tsx | 2 +- .../app/admin/_components/SubmissionTabs.tsx | 13 ++++++-- .../admin/_components/submission-rating.css | 11 +++++++ 4 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 packages/nextjs/app/admin/_components/submission-rating.css diff --git a/packages/nextjs/app/admin/_components/SubmissionCard.tsx b/packages/nextjs/app/admin/_components/SubmissionCard.tsx index 1e2907e..e3a66d4 100644 --- a/packages/nextjs/app/admin/_components/SubmissionCard.tsx +++ b/packages/nextjs/app/admin/_components/SubmissionCard.tsx @@ -2,6 +2,7 @@ import { useRouter } from "next/navigation"; import { SubmissionComments } from "./SubmissionComments"; +import "./submission-rating.css"; import { useMutation } from "@tanstack/react-query"; import { useAccount } from "wagmi"; import { Address } from "~~/components/scaffold-eth"; @@ -83,7 +84,7 @@ export const SubmissionCard = ({ submission }: { submission: Submission }) => { const telegramUser = submission.telegram?.replace("@", ""); return ( -
+

{submission.title}

@@ -162,7 +163,7 @@ export const SubmissionCard = ({ submission }: { submission: Submission }) => {

{submission.description}

{submission.feedback &&

Extensions feedback: {submission.feedback}

} -
+
{ vote(i + 1)} /> ))} - {score > 0 && ( - - )}
+ {score > 0 && ( + + )}
- - -
-
{scoreAvg}
-
{submission.votes.length} votes
+
+
+
{scoreAvg}
+
{submission.votes.length} votes
+
+
diff --git a/packages/nextjs/app/admin/_components/SubmissionComments.tsx b/packages/nextjs/app/admin/_components/SubmissionComments.tsx index bbbcd59..fff593c 100644 --- a/packages/nextjs/app/admin/_components/SubmissionComments.tsx +++ b/packages/nextjs/app/admin/_components/SubmissionComments.tsx @@ -47,7 +47,7 @@ export const SubmissionComments = ({ submission }: { submission: Submission }) = }; return ( -
+