fix(import): keep the import cards on the SPA and balance the trio

The JSON and CSV cards linked to the in-app docs with a raw anchor, so
tapping the schema link triggered a full-page reload that discarded an
in-progress paste or upload in the sibling card; route them through the
Next Link instead. The three import cards also dropped to a two-column grid
at md, orphaning the CSV card alone on a second row — add a three-column
track at xl so the set reads as one family.
This commit is contained in:
Marc-André Bombeck committed 2026-06-15 01:21:35 +02:00
1 parent 5a62d04651
commit c6beba2229
1 file changed
+6 -5
+6 -5
View File
@@ -26,6 +26,7 @@
*/
import { useCallback, useId, useRef, useState } from "react";
import Link from "next/link";
import { useQuery } from "@tanstack/react-query";
import {
AlertCircle,
@@ -67,7 +68,7 @@ export function ImportPanel() {
{t("settings.sections.export.import.description")}
</p>
</div>
<div className="grid gap-4 md:grid-cols-2">
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
<AppleHealthImportCard />
<JsonImportCard />
<CsvImportCard />
@@ -553,12 +554,12 @@ function JsonImportCard() {
<p className="text-muted-foreground text-xs">
{t("settings.sections.export.import.json.schemaHint")}{" "}
<a
<Link
href="/docs/integrations/data-import"
className="text-primary underline underline-offset-2"
>
{t("settings.sections.export.import.json.docsLink")}
</a>
</Link>
</p>
<div aria-live="polite" className="space-y-2">
@@ -778,12 +779,12 @@ function CsvImportCard() {
<p className="text-muted-foreground text-xs">
{t("settings.sections.export.import.csv.schemaHint")}{" "}
<a
<Link
href="/docs/integrations/data-import"
className="text-primary underline underline-offset-2"
>
{t("settings.sections.export.import.csv.docsLink")}
</a>
</Link>
</p>
<div aria-live="polite" className="space-y-2">