From b629d519f4c3d10e01403ca6be1692bd4d5db4de Mon Sep 17 00:00:00 2001
From: Kalle <38327916+Sendouc@users.noreply.github.com>
Date: Sun, 5 Jun 2022 20:12:36 +0300
Subject: [PATCH] Rename voting history to results
---
app/routes/plus.tsx | 6 +++---
app/routes/plus/voting/{history.tsx => results.tsx} | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
rename app/routes/plus/voting/{history.tsx => results.tsx} (94%)
diff --git a/app/routes/plus.tsx b/app/routes/plus.tsx
index 55f3b1289..482090e11 100644
--- a/app/routes/plus.tsx
+++ b/app/routes/plus.tsx
@@ -10,12 +10,12 @@ export default function PlusPageLayout() {
Suggestions
-
- Voting History
+
+ Results
{canVoteFE() ? (
- Vote
+ Voting
) : null}
diff --git a/app/routes/plus/voting/history.tsx b/app/routes/plus/voting/results.tsx
similarity index 94%
rename from app/routes/plus/voting/history.tsx
rename to app/routes/plus/voting/results.tsx
index 5e460b1d4..ebee15d28 100644
--- a/app/routes/plus/voting/history.tsx
+++ b/app/routes/plus/voting/results.tsx
@@ -31,7 +31,7 @@ export const meta: MetaFunction = () => {
};
};
-interface PlusVotingHistoryLoaderData {
+interface PlusVotingResultsLoaderData {
results: PlusVotingResultByMonthYear["results"];
ownScores?: {
score?: PlusVotingResult["score"];
@@ -47,14 +47,14 @@ export const loader: LoaderFunction = async ({ request }) => {
userId: user?.id,
});
- return json({
+ return json({
results,
ownScores: ownScores?.map(maybeHideScore),
});
};
-export default function PlusVotingHistoryPage() {
- const data = useLoaderData();
+export default function PlusVotingResultsPage() {
+ const data = useLoaderData();
const { month, year } = lastCompletedVoting(new Date());
@@ -87,7 +87,7 @@ export default function PlusVotingHistoryPage() {
}
function Results() {
- const data = useLoaderData();
+ const data = useLoaderData();
return (