mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
22 lines
400 B
TypeScript
22 lines
400 B
TypeScript
import type { Pool } from 'types/api/pools';
|
|
|
|
type PoolLink = {
|
|
url: string;
|
|
image: string;
|
|
title: string;
|
|
};
|
|
|
|
export default function getPoolLinks(pool?: Pool): Array<PoolLink> {
|
|
if (!pool) {
|
|
return [];
|
|
}
|
|
|
|
return [
|
|
{
|
|
url: pool.coin_gecko_terminal_url,
|
|
image: '/static/gecko_terminal.png',
|
|
title: 'GeckoTerminal',
|
|
},
|
|
].filter(link => Boolean(link.url));
|
|
}
|