From 82e03978b89938219958032efb1448cc76baa181 Mon Sep 17 00:00:00 2001
From: Saumit <justsaumit@protonmail.com>
Date: Sat, 27 Sep 2025 02:14:26 +0530
Subject: Initial snapshot - OpenTelemetry demo 2.1.3 -f

---
 src/frontend/components/CartItems/CartItem.tsx | 40 ++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 src/frontend/components/CartItems/CartItem.tsx

(limited to 'src/frontend/components/CartItems/CartItem.tsx')

diff --git a/src/frontend/components/CartItems/CartItem.tsx b/src/frontend/components/CartItems/CartItem.tsx
new file mode 100644
index 0000000..e78bb7a
--- /dev/null
+++ b/src/frontend/components/CartItems/CartItem.tsx
@@ -0,0 +1,40 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+import Link from 'next/link';
+import { Product } from '../../protos/demo';
+import ProductPrice from '../ProductPrice';
+import * as S from './CartItems.styled';
+
+interface IProps {
+  product: Product;
+  quantity: number;
+}
+
+const CartItem = ({
+  product: { id, name, picture, priceUsd = { units: 0, nanos: 0, currencyCode: 'USD' } },
+  quantity,
+}: IProps) => {
+  return (
+    <S.CartItem>
+      <Link href={`/product/${id}`}>
+        <S.NameContainer>
+          <S.CartItemImage alt={name} src={"/images/products/" + picture} />
+          <p>{name}</p>
+        </S.NameContainer>
+      </Link>
+      <S.CartItemDetails>
+        <p>{quantity}</p>
+      </S.CartItemDetails>
+      <S.CartItemDetails>
+        <S.PriceContainer>
+          <p>
+            <ProductPrice price={priceUsd} />
+          </p>
+        </S.PriceContainer>
+      </S.CartItemDetails>
+    </S.CartItem>
+  );
+};
+
+export default CartItem;
-- 
cgit v1.2.3

