Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions src/components/activity/ActivityFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ interface DisplayPair {

const getAllIds = (meta?: ActivityMeta): DisplayID[] => {
if (!meta) return [];
return Object.entries(meta.strategies).map(([id, pair]) => ({
id: id,
base: pair[0],
quote: pair[1],
}));
return Object.entries(meta.strategies)
.map(([id, pair]) => ({ id, base: pair[0], quote: pair[1] }))
.sort((a, b) => Number(a.id) - Number(b.id));
};
const getAllPairs = (meta?: ActivityMeta): DisplayPair[] => {
if (!meta) return [];
return meta.pairs.map(([base, quote]) => ({
pair: toPairSlug(base, quote),
base,
quote,
}));
return meta.pairs
.map(([base, quote]) => ({
pair: toPairSlug(base, quote),
base,
quote,
}))
.sort((a, b) => a.pair.localeCompare(b.pair));
};
export interface ActivityFilterProps {
filters?: ('ids' | 'pairs')[];
Expand Down
9 changes: 6 additions & 3 deletions src/pages/explorer/activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ export const ExplorerActivityPage = () => {
return params;
}, [type, search]);

const filters = useMemo(() => {
if (type === 'pair') return ['ids' as const];
return ['ids' as const, 'pairs' as const];
}, [type]);

return (
<ActivityProvider params={params} url="/explore/activity">
<ActivityLayout
filters={type === 'wallet' ? ['ids', 'pairs'] : ['ids']}
/>
<ActivityLayout filters={filters} />
</ActivityProvider>
);
};