add file download for tracking page

This commit is contained in:
smanylov
2026-05-08 13:39:37 +07:00
parent 07e1237f05
commit b8a76bd6a9
8 changed files with 109 additions and 41 deletions
+10 -9
View File
@@ -1,9 +1,9 @@
import Providers from '@/app/providers/getQueryServer'
import type { Metadata } from "next";
import { NextIntlClientProvider, hasLocale } from 'next-intl';
import { notFound } from 'next/navigation';
import { routing } from '@/i18n/routing';
import { ToastProvider } from '@/app/providers/ToastProvider';
import ClientProviders from '@/app/providers/ClientProviders';
import { Suspense } from 'react';
import "../styles/globals.css";
import "../styles/global-styles.scss";
@@ -30,14 +30,15 @@ export default async function RootLayout({
}
return (
<html lang={locale}>
<html>
<body>
<NextIntlClientProvider>
<Providers>
{children}
<ToastProvider />
</Providers>
</NextIntlClientProvider>
<Suspense fallback={<div>Loading...</div>}>
<NextIntlClientProvider locale={locale}>
<ClientProviders>
{children}
</ClientProviders>
</NextIntlClientProvider>
</Suspense>
</body>
</html>
);
+8 -3
View File
@@ -1,9 +1,14 @@
'use client'
import { PdfProvider } from '@/app/contexts/PdfContext';
import { WatchDocProviders } from '@/app/providers/ClientProviders';
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<PdfProvider>
{children}
</PdfProvider>
<WatchDocProviders>
<PdfProvider>
{children}
</PdfProvider>
</WatchDocProviders>
);
}
+1 -1
View File
@@ -119,7 +119,7 @@ export default async function Page({ searchParams }: PageProps) {
<div className="watch-doc-actions">
{response?.permissions?.DOWNLOAD && (
<DownloadButton />
<DownloadButton fileId={docid} fileName={response?.fileName}/>
)}
<CopyLinkButton />
</div>