v3: localization fixes, char counters & limits on all text fields, ux fixes
This commit is contained in:
@@ -83,9 +83,21 @@ export function Index() {
|
||||
);
|
||||
const mainFetchDone = useRef(false);
|
||||
|
||||
const rawTab = new URLSearchParams(location.search).get("tab") ?? "hot";
|
||||
const searchParams = new URLSearchParams(location.search);
|
||||
const rawTab = searchParams.get("tab") ?? "hot";
|
||||
const tab: FeedTab = VALID_TABS.has(rawTab) ? rawTab as FeedTab : "hot";
|
||||
|
||||
// Web Share Target: Android share sheet navigates to /?share_url=...
|
||||
const shareUrl = searchParams.get("share_url") ??
|
||||
searchParams.get("share_text") ?? "";
|
||||
|
||||
useEffect(() => {
|
||||
if (!shareUrl) return;
|
||||
// Clean share params from the URL so a refresh doesn't re-open the modal
|
||||
const clean = tab !== "hot" ? `?tab=${tab}` : "";
|
||||
globalThis.history.replaceState({}, "", location.pathname + clean);
|
||||
}, [shareUrl, tab, location.pathname]);
|
||||
|
||||
// ── Main feed fetch ──
|
||||
|
||||
useEffect(() => {
|
||||
@@ -241,6 +253,7 @@ export function Index() {
|
||||
</div>
|
||||
}
|
||||
disableNew={dumpsState.status === "error"}
|
||||
initialDumpUrl={shareUrl || undefined}
|
||||
/>
|
||||
|
||||
<div className="index-below-header">
|
||||
|
||||
Reference in New Issue
Block a user