update pay function
This commit is contained in:
@@ -33,7 +33,7 @@ import { Search, PenSquare, TrendingUp, Clock, Heart, Zap, HelpCircle } from 'lu
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { forumColors } from '@theme/forumTheme';
|
||||
import { getPosts, searchPosts } from '@services/elasticsearchService';
|
||||
import { getTopics } from '@services/predictionMarketService';
|
||||
import { getTopics } from '@services/predictionMarketService.api';
|
||||
import PostCard from './components/PostCard';
|
||||
import PredictionTopicCard from './components/PredictionTopicCard';
|
||||
import CreatePostModal from './components/CreatePostModal';
|
||||
@@ -93,11 +93,13 @@ const ValueForum = () => {
|
||||
};
|
||||
|
||||
// 获取预测话题列表
|
||||
const fetchPredictionTopics = () => {
|
||||
const fetchPredictionTopics = async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const topics = getTopics({ status: 'active', sortBy });
|
||||
setPredictionTopics(topics);
|
||||
const response = await getTopics({ status: 'active', sort_by: sortBy });
|
||||
if (response.success) {
|
||||
setPredictionTopics(response.data);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取预测话题失败:', error);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user