From 20df47318290cba5d2eaf362b11ffef2dc45986c Mon Sep 17 00:00:00 2001 From: Aamir Azad Date: Tue, 9 Jul 2024 20:53:51 -0400 Subject: [PATCH] Button functionality work --- src/components/audio-preview.tsx | 2 +- src/components/document-viewer.tsx | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/audio-preview.tsx b/src/components/audio-preview.tsx index b4d3f47..100b5ed 100644 --- a/src/components/audio-preview.tsx +++ b/src/components/audio-preview.tsx @@ -20,7 +20,7 @@ import { useState } from "react"; const queryClient = new QueryClient(); const fetchUserData = async (): Promise => { - const response = await fetch(`/api/getUserData`); + const response = await fetch("/api/getUserData"); if (!response.ok) { throw new Error("Network error"); } diff --git a/src/components/document-viewer.tsx b/src/components/document-viewer.tsx index 9971907..44dd3c4 100644 --- a/src/components/document-viewer.tsx +++ b/src/components/document-viewer.tsx @@ -11,9 +11,9 @@ import { } from "@tanstack/react-query"; import type { AdviceAPIType } from "@/types"; import OpenInternalLink from "./internal-link"; -import { ExternalLink } from "lucide-react"; import OpenExternalLink from "./external-link"; -import { UsersTableType } from "@/server/db/schema"; +import type { UsersTableType } from "@/server/db/schema"; +import { Download } from "lucide-react"; const queryClient = new QueryClient(); @@ -172,7 +172,7 @@ function DocumentViewer(props: { id: number }) {

-
+
Download + - Open + + Open +