+
{submission.title}
+
+
+ {submission.linkToRepository && (
+
+
+
+
+
+
+ )}
+
+
+
+
+
+
+
+
+ {submission.telegram && (
+
+
+
+ )}
+
+ {submission.builder &&
}
+
+
+
{submission.description}
+ {submission.feedback &&
Extensions feedback: {submission.feedback}
}
+
+
-
{submission.title}
- {submission.linkToRepository && (
-
- {submission.linkToRepository}
-
- )}
-
{submission.description}
-
- Video:
-
- {submission.linkToVideo}
-
-
- {submission.builder &&
}
- {submission.telegram &&
Telegram: {submission.telegram}
}
- {submission.feedback &&
Extensions feedback: {submission.feedback}
}
-
-
-
{submission.comments.length} comments
-
- {submission.comments?.map(comment => (
-
-
-
-
{comment.comment}
-
{comment.createdAt ? getFormattedDateTime(new Date(comment.createdAt)) : "-"}
-
-
- ))}
-
+
+
+
+
+
{submission.comments.length} comments
+
+ {submission.comments?.map(comment => (
+
-
+
+
{comment.comment}
+
{comment.createdAt ? getFormattedDateTime(new Date(comment.createdAt)) : "-"}
+ ))}
+
+
+
+ {
+ setNewComment(field.target.value);
+ }}
+ />
+ Add Comment
+
+
+
+
{scoreAvg}
+
{submission.votes.length} votes
+
);
diff --git a/packages/nextjs/app/admin/_components/Submissions.tsx b/packages/nextjs/app/admin/_components/Submissions.tsx
index 7cd59f7..8301f63 100644
--- a/packages/nextjs/app/admin/_components/Submissions.tsx
+++ b/packages/nextjs/app/admin/_components/Submissions.tsx
@@ -5,12 +5,12 @@ export const Submissions = async () => {
const submissions = await getAllSubmissions();
return (
- <>
-
+
+
{submissions?.map(submission => {
return ;
})}
- >
+
);
};
diff --git a/packages/nextjs/public/logo-telegram.svg b/packages/nextjs/public/logo-telegram.svg
new file mode 100644
index 0000000..b49dbf7
--- /dev/null
+++ b/packages/nextjs/public/logo-telegram.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
From 9a8587f5f230b1a3c7c0917bdfc884107842e593 Mon Sep 17 00:00:00 2001
From: Hunter Chang <716376+ChangoMan@users.noreply.github.com>
Date: Fri, 23 Aug 2024 12:12:10 +0800
Subject: [PATCH 2/3] adjust admin card padding and grid spacing
---
packages/nextjs/app/admin/_components/SubmissionCard.tsx | 7 ++++---
packages/nextjs/app/admin/_components/Submissions.tsx | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/packages/nextjs/app/admin/_components/SubmissionCard.tsx b/packages/nextjs/app/admin/_components/SubmissionCard.tsx
index ee99ccd..d92f18b 100644
--- a/packages/nextjs/app/admin/_components/SubmissionCard.tsx
+++ b/packages/nextjs/app/admin/_components/SubmissionCard.tsx
@@ -91,10 +91,10 @@ export const SubmissionCard = ({ submission }: { submission: Submission }) => {
return (
-
+
{submission.title}
-
-
+
+
{submission.linkToRepository && (
{
)}
+
{submission.builder &&
}
diff --git a/packages/nextjs/app/admin/_components/Submissions.tsx b/packages/nextjs/app/admin/_components/Submissions.tsx
index 8301f63..36ba65e 100644
--- a/packages/nextjs/app/admin/_components/Submissions.tsx
+++ b/packages/nextjs/app/admin/_components/Submissions.tsx
@@ -5,8 +5,8 @@ export const Submissions = async () => {
const submissions = await getAllSubmissions();
return (
-
-
+
+
{submissions?.map(submission => {
return
;
})}
From 78131ac6140fb1d0a5573a19d6dfb058bdef2f4e Mon Sep 17 00:00:00 2001
From: Hunter Chang <716376+ChangoMan@users.noreply.github.com>
Date: Fri, 23 Aug 2024 21:04:09 +0800
Subject: [PATCH 3/3] move icons to svg files
---
packages/nextjs/.eslintrc.json | 1 +
.../app/admin/_components/SubmissionCard.tsx | 32 ++-----------------
packages/nextjs/public/icon-github.svg | 1 +
.../{logo-telegram.svg => icon-telegram.svg} | 0
packages/nextjs/public/icon-youtube.svg | 1 +
5 files changed, 6 insertions(+), 29 deletions(-)
create mode 100644 packages/nextjs/public/icon-github.svg
rename packages/nextjs/public/{logo-telegram.svg => icon-telegram.svg} (100%)
create mode 100644 packages/nextjs/public/icon-youtube.svg
diff --git a/packages/nextjs/.eslintrc.json b/packages/nextjs/.eslintrc.json
index c120c8c..018c5f8 100644
--- a/packages/nextjs/.eslintrc.json
+++ b/packages/nextjs/.eslintrc.json
@@ -5,6 +5,7 @@
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/ban-ts-comment": ["off"],
+ "@next/next/no-img-element": ["off"],
"prettier/prettier": [
"warn",
{
diff --git a/packages/nextjs/app/admin/_components/SubmissionCard.tsx b/packages/nextjs/app/admin/_components/SubmissionCard.tsx
index d92f18b..5d26b67 100644
--- a/packages/nextjs/app/admin/_components/SubmissionCard.tsx
+++ b/packages/nextjs/app/admin/_components/SubmissionCard.tsx
@@ -97,43 +97,17 @@ export const SubmissionCard = ({ submission }: { submission: Submission }) => {
diff --git a/packages/nextjs/public/icon-github.svg b/packages/nextjs/public/icon-github.svg
new file mode 100644
index 0000000..ca269a0
--- /dev/null
+++ b/packages/nextjs/public/icon-github.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/nextjs/public/logo-telegram.svg b/packages/nextjs/public/icon-telegram.svg
similarity index 100%
rename from packages/nextjs/public/logo-telegram.svg
rename to packages/nextjs/public/icon-telegram.svg
diff --git a/packages/nextjs/public/icon-youtube.svg b/packages/nextjs/public/icon-youtube.svg
new file mode 100644
index 0000000..5de99f8
--- /dev/null
+++ b/packages/nextjs/public/icon-youtube.svg
@@ -0,0 +1 @@
+
\ No newline at end of file