feat(user): Add 'gift_amount' field and update related references in user services and components

This commit is contained in:
web@ppanel
2025-01-08 23:25:13 +07:00
parent a4e9d5da59
commit b13c77e9b7
6 changed files with 16 additions and 10 deletions
@@ -27,7 +27,7 @@ interface UnsubscribeProps {
export default function Unsubscribe({ id, allowDeduction }: Readonly<UnsubscribeProps>) {
const t = useTranslations('subscribe.unsubscribe');
const router = useRouter();
const { common } = useGlobalStore();
const { common, getUserInfo } = useGlobalStore();
const single_model = common.subscribe.single_model;
const [open, setOpen] = useState(false);
@@ -51,6 +51,7 @@ export default function Unsubscribe({ id, allowDeduction }: Readonly<Unsubscribe
);
toast.success(t('success'));
router.refresh();
await getUserInfo();
setOpen(false);
} catch (error) {
toast.error(t('failed'));