Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Developer Portal #1810

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions apps/web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ NODE_OPTIONS=--inspect
NEXT_PUBLIC_TRON_PRO_API_KEY=''
BITQUERY_API_KEY=''
BITQUERY_BEARER_TOKEN=''

AUTH_SESSION_SECRET=""
ZITADEL_ISSUER=""
ZITADEL_CLIENT_ID=""
ZITADEL_CLIENT_SECRET=""
ZITADEL_SA_TOKEN=""
5 changes: 5 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const bundleAnalyzer = withBundleAnalyzer({
/** @type {import('next').NextConfig} */
const nextConfig = bundleAnalyzer({
...defaultNextConfig,
logging: {
fetches: {
fullUrl: true,
},
},
experimental: {
...defaultNextConfig.experimental,
testProxy: process.env.NEXT_PUBLIC_APP_ENV === 'test',
Expand Down
3 changes: 3 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@
"@vercel/speed-insights": "1.0.12",
"@wagmi/connectors": "5.7.3",
"@wagmi/core": "catalog:web3",
"@zitadel/client": "1.0.2",
"@zitadel/proto": "1.0.2",
"cors": "2.8.5",
"d3": "7.8.4",
"date-fns": "2.30.0",
"echarts": "4.9.0",
"echarts-for-react": "3.0.2",
"fewcha-plugin-wallet-adapter": "0.1.3",
"framer-motion": "11.15.0",
"iron-session": "8.0.4",
"lodash.frompairs": "4.0.1",
"lodash.maxby": "4.6.0",
"lodash.once": "4.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ export const NAME_COLUMN: ColumnDef<TopPool, unknown> = {
header: 'Name',
cell: (props) => <PoolNameCell row={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={30} />
<SkeletonCircle radius={30} className="-ml-[10px]" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={30} />
<SkeletonCircle radius={30} className="-ml-[10px]" />
</div>
<div className="flex flex-col w-full min-w-[120px]">
<SkeletonText fontSize="lg" />
</div>
</div>
<div className="flex flex-col w-full min-w-[120px]">
<SkeletonText fontSize="lg" />
</div>
</div>
),
),
},
},
}

Expand All @@ -34,7 +36,9 @@ export const TVL_COLUMN: ColumnDef<TopPool, unknown> = {
? '$0.00'
: formatUSD(props.row.original.liquidityUSD),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -49,7 +53,9 @@ export const VOLUME_1D_COLUMN: ColumnDef<TopPool, unknown> = {
? '$0.00'
: formatUSD(props.row.original.volumeUSD1d),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -64,7 +70,9 @@ export const FEES_1D_COLUMN: ColumnDef<TopPool, unknown> = {
? '$0.00'
: formatUSD(props.row.original.feeUSD1d),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -76,7 +84,9 @@ export const TRANSACTIONS_1D_COLUMN: ColumnDef<TopPool, unknown> = {
rowA.txCount1d - rowB.txCount1d,
cell: (props) => props.row.original.txCount1d,
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -86,6 +96,8 @@ export const APR_COLUMN: ColumnDef<TopPool, unknown> = {
accessorFn: (row) => row.totalApr1d,
cell: (props) => formatPercent(props.row.original.totalApr1d),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ export const NAME_COLUMN: ColumnDef<PoolExtendedWithAprVolume, unknown> = {
header: 'Name',
cell: (props) => <PositionNameCell row={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={26} />
<SkeletonCircle radius={26} className="-ml-[12px]" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={26} />
<SkeletonCircle radius={26} className="-ml-[12px]" />
</div>
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
),
),
},
},
}

Expand All @@ -32,13 +34,15 @@ export const TVL_COLUMN: ColumnDef<PoolExtendedWithAprVolume, unknown> = {
<PoolMyPositionTVLCell isSize={false} row={props.row.original} />
),
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
</div>
),
),
},
},
}

Expand All @@ -52,13 +56,15 @@ export const MYPOSITION_TVL_COLUMN: ColumnDef<
<PoolMyPositionTVLCell isSize={true} row={props.row.original} />
),
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
</div>
),
),
},
},
}

Expand All @@ -70,12 +76,14 @@ export const MYPOSITION_APR_COLUMN: ColumnDef<
header: 'APR',
cell: (props) => <PoolMyPositionAprCell row={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
</div>
),
),
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ export const NAME_COLUMN: ColumnDef<TopPool, unknown> = {
header: 'Name',
cell: (props) => <PoolNameCell data={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={30} />
<SkeletonCircle radius={30} className="-ml-[10px]" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={30} />
<SkeletonCircle radius={30} className="-ml-[10px]" />
</div>
<div className="flex flex-col w-full min-w-[120px]">
<SkeletonText fontSize="lg" />
</div>
</div>
<div className="flex flex-col w-full min-w-[120px]">
<SkeletonText fontSize="lg" />
</div>
</div>
),
),
},
},
}

Expand All @@ -34,7 +36,9 @@ export const TVL_COLUMN: ColumnDef<TopPool, unknown> = {
? '$0.00'
: formatUSD(props.row.original.liquidityUSD),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -49,7 +53,9 @@ export const VOLUME_1D_COLUMN: ColumnDef<TopPool, unknown> = {
? '$0.00'
: formatUSD(props.row.original.volumeUSD1d),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -64,7 +70,9 @@ export const FEES_1D_COLUMN: ColumnDef<TopPool, unknown> = {
? '$0.00'
: formatUSD(props.row.original.feeUSD1d),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -76,7 +84,9 @@ export const TRANSACTIONS_1D_COLUMN: ColumnDef<TopPool, unknown> = {
rowA.txCount1d - rowB.txCount1d,
cell: (props) => props.row.original.txCount1d,
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}

Expand All @@ -86,6 +96,8 @@ export const APR_COLUMN: ColumnDef<TopPool, unknown> = {
accessorFn: (row) => row.totalApr1d,
cell: (props) => formatPercent(props.row.original.totalApr1d),
meta: {
skeleton: <SkeletonText fontSize="lg" />,
body: {
skeleton: <SkeletonText fontSize="lg" />,
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ export const POSITION_NAME_COLUMN: ColumnDef<IPositionRowData, unknown> = {
header: 'Name',
cell: (props) => <PositionNameCell data={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={ICON_SIZE} />
<SkeletonCircle radius={ICON_SIZE} className="-ml-[12px]" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex items-center">
<SkeletonCircle radius={ICON_SIZE} />
<SkeletonCircle radius={ICON_SIZE} className="-ml-[12px]" />
</div>
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
),
),
},
},
}

Expand All @@ -31,13 +33,15 @@ export const VALUE_COLUMN: ColumnDef<IPositionRowData, unknown> = {
header: 'Value',
cell: (props) => <PositionValueCell data={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
</div>
),
),
},
},
}

Expand All @@ -46,26 +50,30 @@ export const SIZE_COLUMN: ColumnDef<IPositionRowData, unknown> = {
header: 'Size',
cell: (props) => <PositionSizeCell data={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
</div>
),
),
},
},
}
export const APR_COLUMN: ColumnDef<IPositionRowData, unknown> = {
id: 'apr',
header: 'APR',
cell: (props) => <PositionAprCell data={props.row.original} />,
meta: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
body: {
skeleton: (
<div className="flex items-center w-full gap-2">
<div className="flex flex-col w-full">
<SkeletonText fontSize="lg" />
</div>
</div>
</div>
),
),
},
},
}
Loading
Loading