Skip to content

Commit

Permalink
feat: filter activites list
Browse files Browse the repository at this point in the history
  • Loading branch information
hujie123456 committed Apr 16, 2024
1 parent abe79a1 commit 85f032e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/service/share/share.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ declare global {
export interface ShareRequest {
subject?: string;
trader?: string;
relatedAddress?: string;
}
/**
* xfans-be.api.v1.GetTradesRes
Expand Down
4 changes: 3 additions & 1 deletion src/welcome/Profile/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import UserName from '../../components/User';
import { useNewList, useRecentList, useShareList, useTopList } from '../../service/share';
import useProfileModal from '../../store/useProfileModal';
import useShareStore from '../../store/useShareStore';
import useUserStore from '../../store/useUserStore';
import { getTimeDistanceFromDate } from '../../utils';

const Explore = () => {
Expand All @@ -27,6 +28,7 @@ const Explore = () => {
const { run: getNewList, loading: loading2 } = useNewList();
const { run: getRecentList, loading: loading3 } = useRecentList();
const { shareList, topList, newList, recentList } = useShareStore((state) => ({ ...state }));
const { userInfo } = useUserStore((state) => ({ ...state }));

const [value, setValue] = React.useState('1');
const [loadingx, setLoadingx] = React.useState(true);
Expand All @@ -35,7 +37,7 @@ const Explore = () => {
1: getTopList,
2: getNewList,
3: getRecentList,
4: getShareList,
4: () => getShareList({ relatedAddress: userInfo?.walletAddress }),
};

const handleChange = (event: React.SyntheticEvent, newValue: string) => {
Expand Down

0 comments on commit 85f032e

Please sign in to comment.