fix(SW-113): add colors to negative and positive point transactions

This commit is contained in:
Simon Emanuelsson
2024-08-06 14:11:10 +02:00
parent a5dbd38654
commit c94b83464f
7 changed files with 86 additions and 23 deletions

View File

@@ -1,3 +1,7 @@
import { awardPointsVariants } from "@/components/MyPages/Blocks/Points/EarnAndBurn/Desktop/Row/awardPointsVariants"
import type { VariantProps } from "class-variance-authority"
import type { Lang } from "@/constants/languages"
import type { UserQueryRouter } from "../user"
@@ -5,8 +9,10 @@ export type TransactionResponse = Awaited<
ReturnType<UserQueryRouter["transaction"]["friendTransactions"]>
>
export type TransactionsNonNullResponseObject = NonNullable<TransactionResponse>
export type Transactions = NonNullable<TransactionsNonNullResponseObject>["data"]
export type Transaction = NonNullable<TransactionsNonNullResponseObject>["data"][number]
export type Transactions =
NonNullable<TransactionsNonNullResponseObject>["data"]
export type Transaction =
NonNullable<TransactionsNonNullResponseObject>["data"][number]
export type ClientEarnAndBurnProps = {
initialData: TransactionsNonNullResponseObject
@@ -26,3 +32,8 @@ export interface RowProps {
lang: Lang
transaction: Transaction
}
export interface AwardPointsProps extends Pick<Transaction, "awardPoints"> {}
export interface AwardPointsVariantProps
extends VariantProps<typeof awardPointsVariants> {}