Skip to content

Commit

Permalink
fix(apps/aptos): links
Browse files Browse the repository at this point in the history
  • Loading branch information
LufyCZ committed Aug 3, 2024
1 parent 778ce88 commit 7227d50
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ const nextConfig = bundleAnalyzer({
permanent: true,
destination: '/pool/:path*',
},
{
source: '/aptos',
permanent: true,
destination: '/aptos/swap',
},
{
source: '/skale/swap',
permanent: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
15 changes: 10 additions & 5 deletions apps/web/src/app/(non-evm)/aptos/pool/(landing)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@ export default function TabsLayout({
<LinkInternal
shallow={true}
scroll={false}
href={`/pool?${searchParams.toString()}`}
href={`/aptos/pool?${searchParams.toString()}`}
>
<PathnameButton id="all-pools" pathname={'/pool'} asChild size="sm">
<PathnameButton
id="all-pools"
pathname={'/aptos/pool'}
asChild
size="sm"
>
All Pools
</PathnameButton>
</LinkInternal>
<LinkInternal
shallow={true}
scroll={false}
href={`/pool/my-positions?${searchParams.toString()}`}
href={`/aptos/pool/my-positions?${searchParams.toString()}`}
>
<PathnameButton
id="my-positions"
pathname={'/pool/my-positions'}
pathname={'/aptos/pool/my-positions'}
asChild
size="sm"
>
Expand All @@ -50,7 +55,7 @@ export default function TabsLayout({
<PathnameButton
disabled
id="my-rewards"
pathname={'/pool/my-rewards'}
pathname={'/aptos/pool/my-rewards'}
size="sm"
>
My Rewards
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(non-evm)/aptos/pool/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Hero: FC = () => {
<div className="flex flex-col sm:flex-row w-full sm:w-[unset] gap-4">
<div className="flex items-center w-full">
<Button asChild size="lg">
<LinkInternal href="/pool/add">
<LinkInternal href="/aptos/pool/add">
I want to create a position
</LinkInternal>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<TableState> = useMemo(() => {
Expand Down

0 comments on commit 7227d50

Please sign in to comment.