feat: enhance TokensPage and useTokensData to support Fluent integration and notifications

This commit is contained in:
CaIon
2025-08-09 17:02:06 +08:00
parent ae22ba593a
commit 4cec55c9a4
2 changed files with 245 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ import {
import { ITEMS_PER_PAGE } from '../../constants';
import { useTableCompactMode } from '../common/useTableCompactMode';
export const useTokensData = () => {
export const useTokensData = (openFluentNotification) => {
const { t } = useTranslation();
// Basic state
@@ -121,6 +121,10 @@ export const useTokensData = () => {
// Open link function for chat integrations
const onOpenLink = async (type, url, record) => {
if (url && url.startsWith('fluent')) {
openFluentNotification(record.key);
return;
}
let status = localStorage.getItem('status');
let serverAddress = '';
if (status) {