🔗 feat: add navigation to topup page from balance cards
- Add click-to-navigate functionality on balance cards in both Detail and TokensTable components - Implement navigation to '/console/topup' when clicking on current balance - Add useNavigate hook and necessary imports - Keep consistent navigation behavior across components Components affected: - web/src/pages/Detail/index.js - web/src/components/TokensTable.js
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useEffect, useState, useContext } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
API,
|
||||
copy,
|
||||
@@ -48,6 +49,7 @@ function renderTimestamp(timestamp) {
|
||||
|
||||
const TokensTable = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const [userState, userDispatch] = useContext(UserContext);
|
||||
|
||||
const renderStatus = (status, model_limits_enabled = false) => {
|
||||
@@ -576,6 +578,7 @@ const TokensTable = () => {
|
||||
shadows='hover'
|
||||
className="bg-blue-50 border-0 !rounded-2xl w-full"
|
||||
headerLine={false}
|
||||
onClick={() => navigate('/console/topup')}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
<Avatar
|
||||
|
||||
Reference in New Issue
Block a user