Alerts: backup-contact phrasing; correct backup countdown; include per-position pay link; deep-link route rendering in-place; single-position view via deep-link; ARB alias; backup test message alignment
This commit is contained in:
26
app/dapp/position/[network]/[preset]/[tokenId]/page.tsx
Normal file
26
app/dapp/position/[network]/[preset]/[tokenId]/page.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useParams } from "next/navigation";
|
||||
import DappPage from "../../../../page";
|
||||
|
||||
export default function PositionDeepLinkPage() {
|
||||
const params = useParams<{ network: string; preset: string; tokenId: string }>();
|
||||
|
||||
useEffect(() => {
|
||||
try {
|
||||
const network = String(params?.network || '').toUpperCase();
|
||||
const preset = Number(params?.preset || '1');
|
||||
const tokenId = String(params?.tokenId || '');
|
||||
if (!network || !preset || !tokenId) return;
|
||||
// Persist for Dapp page to consume on mount; keep URL unchanged
|
||||
const payload = { network, preset, tokenId, ts: Math.floor(Date.now() / 1000) };
|
||||
if (typeof window !== 'undefined') {
|
||||
localStorage.setItem('dapp:deeplink:v1', JSON.stringify(payload));
|
||||
}
|
||||
} catch {}
|
||||
}, [params]);
|
||||
|
||||
// Render the main Dapp UI without redirect; it will consume the deep-link
|
||||
return <DappPage />;
|
||||
}
|
||||
Reference in New Issue
Block a user