From b7248f0455987cc20f75f79bf57fd261badfe0f0 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:29:19 +0800 Subject: [PATCH] feat: enhance BoostModal and RadioCards with animations and conditional rendering --- apps/renderer/src/modules/boost/modal.tsx | 68 +++++++++---------- .../src/modules/boost/radio-cards.tsx | 13 +++- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/apps/renderer/src/modules/boost/modal.tsx b/apps/renderer/src/modules/boost/modal.tsx index 1f29574ca..9aef35e33 100644 --- a/apps/renderer/src/modules/boost/modal.tsx +++ b/apps/renderer/src/modules/boost/modal.tsx @@ -1,14 +1,15 @@ import { from } from "dnum" +import { AnimatePresence, m } from "framer-motion" import { useCallback, useState } from "react" import { Button } from "~/components/ui/button" +import { softSpringPreset } from "~/components/ui/constants/spring" import { LoadingWithIcon } from "~/components/ui/loading" import { useCurrentModal } from "~/components/ui/modal" import { useAuthQuery, useI18n } from "~/hooks/common" import { boosts, useBoostFeedMutation } from "~/queries/boosts" import { useWallet } from "~/queries/wallet" -import { Balance } from "../wallet/balance" import { BoostProgress } from "./boost-progress" import { LevelBenefits } from "./level-benefits" import { RadioCards } from "./radio-cards" @@ -42,27 +43,6 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => { ) } - if (boostFeedMutation.isSuccess) { - return ( -
{t("tip_modal.tip_sent")}
-
-