remove utils folder

This commit is contained in:
Kalle
2021-02-20 17:56:34 +02:00
parent ab7ba5aaa5
commit ff221e0b23
5 changed files with 4 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ import {
} from "components/common/Table";
import UserAvatar from "components/common/UserAvatar";
import { FiCheck } from "react-icons/fi";
import { formatUsername } from "utils/strings";
import { getFullUsername } from "lib/strings";
import { GetVotingSummariesByMonthAndTierData } from "../../services/plusService";
export interface PlusVotingHistoryPageProps {
@@ -62,7 +62,7 @@ const PlusVotingHistoryPage: React.FC<PlusVotingHistoryPageProps> = ({
<TableCell>
<UserAvatar user={summary.user} />
</TableCell>
<TableCell>{formatUsername(summary.user)}</TableCell>
<TableCell>{getFullUsername(summary.user)}</TableCell>
<TableCell
color={summary.percentage >= 50 ? "green.500" : "red.500"}
>

View File

@@ -1,7 +1,7 @@
import { PlusRegion, Prisma } from "@prisma/client";
import prisma from "prisma/client";
import { getPercentageFromCounts } from "utils/plus";
import { userBasicSelection } from "utils/prisma";
import { getPercentageFromCounts } from "lib/plus";
import { userBasicSelection } from "lib/prisma";
export type GetVotingSummariesByMonthAndTierData = Prisma.PromiseReturnType<
typeof getVotingSummariesByMonthAndTier

View File

@@ -1,5 +0,0 @@
import { User } from "@prisma/client";
export const formatUsername = (
user: Pick<User, "discriminator" | "username">
) => `${user.username}#${user.discriminator}`;