-
- {thisMonthsWines.map((wine, index) =>{
-
- return(
-
-
-
- )
- })}
-
+
+
+ {thisMonthsWines.map((wine, index) => {
+ return (
+
+
+
+ );
+ })}
-
);
}
diff --git a/vinoa-web/components/WineListCard/WineListCard.tsx b/vinoa-web/components/WineListCard/WineListCard.tsx
index e3674cb..5a92e06 100644
--- a/vinoa-web/components/WineListCard/WineListCard.tsx
+++ b/vinoa-web/components/WineListCard/WineListCard.tsx
@@ -5,7 +5,7 @@ interface WineProps {
wine: Wine;
}
const WineListCard = ({
- wine: { name, imageUrl, country, region, colour, smell, taste, slug },
+ wine: { name, imageUrl, country, region, smell, taste, body, slug },
}: WineProps) => {
return (
@@ -26,7 +26,7 @@ const WineListCard = ({
Country: {country}
Region: {region}
-
Color: {colour}
+
Body: {body}
Smell: {smell}
Taste: {taste}
diff --git a/vinoa-web/components/WineTastingCard/WineTastingCard.tsx b/vinoa-web/components/WineTastingCard/WineTastingCard.tsx
index 403dc70..86d8379 100644
--- a/vinoa-web/components/WineTastingCard/WineTastingCard.tsx
+++ b/vinoa-web/components/WineTastingCard/WineTastingCard.tsx
@@ -1,26 +1,34 @@
-interface WineTastingProps{
- wine:Wine;
-}
-export default function WineTastingCard({wine}:WineTastingProps){
+import Image from 'next/image';
- return(
-
-
-
- {wine.tag}
-
-
-
{wine.name}
-
{wine.price} NOK
-
-
Taste
{wine.taste}
-
Aroma
{wine.smell}
-
Body
{wine.body}
-
-
+interface WineTastingProps {
+ wine: Wine;
+}
+export default function WineTastingCard({
+ wine: { name, imageUrl, tag, price, taste, smell, body },
+}: WineTastingProps) {
+ return (
+
+
+
+
+
+ {tag}
+
+
+
{name}
+
{price} NOK
+
+
Taste
{taste}
+
Aroma
{smell}
+
Body
{body}
- )
-}
\ No newline at end of file
+
+
+ );
+}
diff --git a/vinoa-web/types/Wine.ts b/vinoa-web/types/Wine.ts
index d8a4ef5..812df2c 100644
--- a/vinoa-web/types/Wine.ts
+++ b/vinoa-web/types/Wine.ts
@@ -11,7 +11,6 @@ type Wine = {
region: string;
smell: string;
taste: string;
- colour: string;
body:string;
users: User[];
};
From ed635f14ee80e5461386ac9d73e86dc8b72e831a Mon Sep 17 00:00:00 2001
From: Thomas McSherry <54848048+ThomasMcSherry@users.noreply.github.com>
Date: Fri, 20 Oct 2023 14:50:44 +0100
Subject: [PATCH 5/6] Vertically centered wine cards on home page
---
vinoa-web/app/page.tsx | 20 ++++++++++---------
.../components/Navigation/Navigation.tsx | 2 +-
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/vinoa-web/app/page.tsx b/vinoa-web/app/page.tsx
index 4172574..2d29a97 100644
--- a/vinoa-web/app/page.tsx
+++ b/vinoa-web/app/page.tsx
@@ -12,15 +12,17 @@ export default async function Home() {
const thisMonthsWines: Wine[] = await getThisMonthsWines(date.from, date.to);
return (
-
-
- {thisMonthsWines.map((wine, index) => {
- return (
-
-
-
- );
- })}
+
+
+
+ {thisMonthsWines.map((wine, index) => {
+ return (
+
+
+
+ );
+ })}
+
);
diff --git a/vinoa-web/components/Navigation/Navigation.tsx b/vinoa-web/components/Navigation/Navigation.tsx
index a5fd187..ef1caa1 100644
--- a/vinoa-web/components/Navigation/Navigation.tsx
+++ b/vinoa-web/components/Navigation/Navigation.tsx
@@ -6,7 +6,7 @@ import { usePathname } from 'next/navigation';
const Navigation = () => {
const path = usePathname();
return (
-