feat: implement import functionality with tab navigation for receipts and invoices

This commit is contained in:
Nils-Johan Gynther
2026-04-16 21:39:23 +02:00
parent 2a0da005ff
commit 4474c4da01
5 changed files with 226 additions and 32 deletions
+18
View File
@@ -0,0 +1,18 @@
import { Metadata } from 'next';
import ImportTabsClient from './ImportTabsClient';
type Props = {
searchParams: Promise<{ tab?: string }>;
};
export async function generateMetadata({ searchParams }: Props): Promise<Metadata> {
const { tab } = await searchParams;
if (tab === 'recept') return { title: 'Importera recept' };
return { title: 'Importera kvitto' };
}
export default async function ImportPage({ searchParams }: Props) {
const { tab } = await searchParams;
const activeTab = tab === 'recept' ? 'recept' : 'kvitto';
return <ImportTabsClient activeTab={activeTab} />;
}