From 7227d50d044083b70cfe47158028f66a1661e4bf Mon Sep 17 00:00:00 2001 From: LufyCZ Date: Sat, 3 Aug 2024 12:43:41 +0000 Subject: [PATCH] fix(apps/aptos): links --- apps/web/next.config.mjs | 5 +++++ .../(common)/lib/edge/use-is-swap-maintenance.ts | 2 +- .../app/(non-evm)/aptos/pool/(landing)/layout.tsx | 15 ++++++++++----- apps/web/src/app/(non-evm)/aptos/pool/hero.tsx | 2 +- .../pool/ui/pools/tables/pools/PoolsTable.tsx | 2 +- .../tables/positions/pool-positions-table.tsx | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index deaebdc6b5..17ae1114ca 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -63,6 +63,11 @@ const nextConfig = bundleAnalyzer({ permanent: true, destination: '/pool/:path*', }, + { + source: '/aptos', + permanent: true, + destination: '/aptos/swap', + }, { source: '/skale/swap', permanent: true, diff --git a/apps/web/src/app/(non-evm)/aptos/(common)/lib/edge/use-is-swap-maintenance.ts b/apps/web/src/app/(non-evm)/aptos/(common)/lib/edge/use-is-swap-maintenance.ts index 2146774b2c..6fca6d3f20 100644 --- a/apps/web/src/app/(non-evm)/aptos/(common)/lib/edge/use-is-swap-maintenance.ts +++ b/apps/web/src/app/(non-evm)/aptos/(common)/lib/edge/use-is-swap-maintenance.ts @@ -8,7 +8,7 @@ export const useIsSwapMaintenance = () => { return useQuery({ queryKey: ['useIsSwapMaintenance'], queryFn: async () => { - const resp = await fetch('/api/config/swap', { + const resp = await fetch('/aptos/api/config/swap', { next: { revalidate: 60 }, }) const data = await resp.json() diff --git a/apps/web/src/app/(non-evm)/aptos/pool/(landing)/layout.tsx b/apps/web/src/app/(non-evm)/aptos/pool/(landing)/layout.tsx index 93d02cb0e0..f3293409a3 100644 --- a/apps/web/src/app/(non-evm)/aptos/pool/(landing)/layout.tsx +++ b/apps/web/src/app/(non-evm)/aptos/pool/(landing)/layout.tsx @@ -22,20 +22,25 @@ export default function TabsLayout({ - + All Pools @@ -50,7 +55,7 @@ export default function TabsLayout({ My Rewards diff --git a/apps/web/src/app/(non-evm)/aptos/pool/hero.tsx b/apps/web/src/app/(non-evm)/aptos/pool/hero.tsx index 1901dd8a2c..5acef8fe01 100644 --- a/apps/web/src/app/(non-evm)/aptos/pool/hero.tsx +++ b/apps/web/src/app/(non-evm)/aptos/pool/hero.tsx @@ -32,7 +32,7 @@ export const Hero: FC = () => {
diff --git a/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/pools/PoolsTable.tsx b/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/pools/PoolsTable.tsx index 7a49c13e58..0b9c8201b2 100644 --- a/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/pools/PoolsTable.tsx +++ b/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/pools/PoolsTable.tsx @@ -44,7 +44,7 @@ export const PoolsTable = () => { // } = useNetwork() const rowLink = useCallback((row: PoolExtended) => { - return `/pool/${row.id}` + return `/aptos/pool/${row.id}` }, []) const filtered = useMemo(() => { diff --git a/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/positions/pool-positions-table.tsx b/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/positions/pool-positions-table.tsx index 03c0c3cedb..f89eb5c5fd 100644 --- a/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/positions/pool-positions-table.tsx +++ b/apps/web/src/app/(non-evm)/aptos/pool/ui/pools/tables/positions/pool-positions-table.tsx @@ -61,7 +61,7 @@ export const PositionsTable = () => { }, [pools, tokenSymbols]) const rowLink = useCallback((row: PoolExtended) => { - return `/pool/${row.id}` + return `/aptos/pool/${row.id}` }, []) const state: Partial = useMemo(() => {