From 451006f8359c21d8db5fd50f4e6904c7d8ce8f64 Mon Sep 17 00:00:00 2001 From: insanik9 Date: Fri, 31 May 2024 14:39:19 -0400 Subject: [PATCH] Fixed ad detail page Back button, changed details/edit button to be consistent with other buttons --- components/ui/ad-details.tsx | 31 ++++++++++++++++++------------- components/ui/button.tsx | 4 ++-- lib/actions.ts | 1 - 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/components/ui/ad-details.tsx b/components/ui/ad-details.tsx index 3e3575d..fb42d93 100644 --- a/components/ui/ad-details.tsx +++ b/components/ui/ad-details.tsx @@ -12,7 +12,7 @@ export default function Form({ channels, ad }: { channels: ChannelField[], ad:Ad
Back @@ -143,7 +143,7 @@ export default function Form({ channels, ad }: { channels: ChannelField[], ad:Ad
{ad.headline5}
-
):null} + ): null}
-

-
-
- -
-
- -
-
+ + {ad.image_url? ( +
+

+
+
+ +
+
+ +
+
+
): null} +

diff --git a/components/ui/button.tsx b/components/ui/button.tsx index 2ca19b3..b6b1e17 100644 --- a/components/ui/button.tsx +++ b/components/ui/button.tsx @@ -27,7 +27,7 @@ export function UpdateAd({ id }: { id: string }) { return ( @@ -42,7 +42,7 @@ export function AdDetails({ id }: { id: string }) { return ( diff --git a/lib/actions.ts b/lib/actions.ts index acac556..c8e922d 100644 --- a/lib/actions.ts +++ b/lib/actions.ts @@ -6,7 +6,6 @@ import { z } from 'zod'; import { revalidatePath } from 'next/cache'; import { redirect } from 'next/navigation'; //import { signIn } from '@/auth'; -import { AuthError } from 'next-auth'; const FormSchema = z.object({ id: z.string(),