diff --git a/src/components/CourseGridItem.jsx b/src/components/CourseGridItem.jsx index adf5873..fcad69e 100644 --- a/src/components/CourseGridItem.jsx +++ b/src/components/CourseGridItem.jsx @@ -1,9 +1,14 @@ +import { formatPrice } from "@/utils"; import styles from "./CourseGridItem.module.css"; export default function CourseGridItem({ course }) { return (
- {course.name} + Kurs resmi +
+ {course.name} + {formatPrice(course.price)} +
); } diff --git a/src/components/CourseGridItem.module.css b/src/components/CourseGridItem.module.css index 3848778..ab9391f 100644 --- a/src/components/CourseGridItem.module.css +++ b/src/components/CourseGridItem.module.css @@ -1,6 +1,25 @@ .root { background-color: var(--color-bg1); border-radius: var(--border-radius); - padding: 1rem; + overflow: hidden; cursor: pointer; } + +.image { + width: 100%; + aspect-ratio: 16 / 9; + object-fit: cover; +} + +.body { + padding: 1rem; + padding-top: 0.5rem; + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.name { + font-size: 1.2rem; + font-weight: 500; +} diff --git a/src/mockData.js b/src/mockData.js index 6d0b343..40f213a 100644 --- a/src/mockData.js +++ b/src/mockData.js @@ -2,13 +2,28 @@ export const COURSES = [ { id: "6a3753e8-5f4e-4f4d-a05e-44b84b8f7aed", name: "Ethereum ve Solidity", + price: "0.05", + imageUrl: "https://osmannyildiz.tk/cublearn/akinci.webp", + instructor: { + name: "Baturalp Güvenç", + }, }, { id: "c7253736-5756-4a64-a072-917c66afa877", name: "Next.js ile Önyüz Uygulamaları Geliştirme", + price: "0.05", + imageUrl: "https://osmannyildiz.tk/cublearn/elmacik.webp", + instructor: { + name: "Furkan Ayvaz", + }, }, { id: "59a8f94b-7358-4ffe-bced-a54cccc93e64", name: "Pardus'a Giriş", + price: "0.05", + imageUrl: "https://osmannyildiz.tk/cublearn/masalik.webp", + instructor: { + name: "Berk Çiçek", + }, }, ]; diff --git a/src/utils.js b/src/utils.js index 7640473..e6516e4 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,3 +1,5 @@ export const cn = (...args) => { return args.filter((arg) => typeof arg === "string").join(" "); }; + +export const formatPrice = (price) => `${price} ETH`;