mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-28 14:18:04 -05:00
Rename voting history to results
This commit is contained in:
@@ -10,12 +10,12 @@ export default function PlusPageLayout() {
|
||||
<SubNavLink to="suggestions" data-cy="profile-page-link">
|
||||
Suggestions
|
||||
</SubNavLink>
|
||||
<SubNavLink to="voting/history" data-cy="edit-page-link">
|
||||
Voting History
|
||||
<SubNavLink to="voting/results" data-cy="edit-page-link">
|
||||
Results
|
||||
</SubNavLink>
|
||||
{canVoteFE() ? (
|
||||
<SubNavLink to="voting" data-cy="edit-page-link">
|
||||
Vote
|
||||
Voting
|
||||
</SubNavLink>
|
||||
) : null}
|
||||
</SubNav>
|
||||
|
||||
@@ -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<PlusVotingHistoryLoaderData>({
|
||||
return json<PlusVotingResultsLoaderData>({
|
||||
results,
|
||||
ownScores: ownScores?.map(maybeHideScore),
|
||||
});
|
||||
};
|
||||
|
||||
export default function PlusVotingHistoryPage() {
|
||||
const data = useLoaderData<PlusVotingHistoryLoaderData>();
|
||||
export default function PlusVotingResultsPage() {
|
||||
const data = useLoaderData<PlusVotingResultsLoaderData>();
|
||||
|
||||
const { month, year } = lastCompletedVoting(new Date());
|
||||
|
||||
@@ -87,7 +87,7 @@ export default function PlusVotingHistoryPage() {
|
||||
}
|
||||
|
||||
function Results() {
|
||||
const data = useLoaderData<PlusVotingHistoryLoaderData>();
|
||||
const data = useLoaderData<PlusVotingResultsLoaderData>();
|
||||
|
||||
return (
|
||||
<div className="stack lg">
|
||||
Reference in New Issue
Block a user