feat: implement import functionality with tab navigation for receipts and invoices
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
Reference in New Issue
Block a user