ReCoded-Org / lets-share-capstone-project

3 stars 2 forks source link

feat: 🎸 added the list component fixes #5 #11

Closed aghimohamad closed 2 years ago

aghimohamad commented 2 years ago

added all the cards and the list component that renders them

Related Issue

Render

Desktop :

Screenshot 2022-07-21 195854

Mobile :

c1zmDSEHb0

copy and paste this code in the index.js file to see the components:

the imports:

import Layout from "@/components/layout/Layout";
import List from "@/components/LandingList";
import Partners from "@/components/Partners";

the testing data:

export const blogs = [
  {
    title: "My Blog",
    date: "01/01/2015",
    description : "This is my blog",
},
{
  title: "My Blog",
  date: "01/01/2015",
  description : "This is my blog",
},
{
  title: "My Blog",
  date: "01/01/2015",
  description : "This is my blog",
},
{
  title: "My Blog",
  date: "01/01/2015",
  description : "This is my blog",
}
]

export const items = [
  {
    title: "My item",
    description : "This is my item",
    location : "istanbul",
    category: "item",
    user : "user1",
},
  {
    title: "My item",
    description : "This is my item",
    location : "istanbul",
    category: "item",
    user : "user1",
},
  {
    title: "My item",
    description : "This is my item",
    location : "istanbul",
    category: "item",
    user : "user1",
},
  {
    title: "My item",
    description : "This is my item",
    category: "item",
    location : "istanbul",
    user : "user1",
},
]

export const categories = [
  { 
    id: 1,
    name: "category",
    description: "This is my category",
  },
  { 
    id: 2,
    name: "category",
    description: "This is my category",
  },
  { 
    id: 3,
    name: "category",
    description: "This is my category",
  },
  { 
    id: 4,
    name: "category",
    description: "This is my category",
  },
]

Rendering the components:

            <List items={items} />
            <hr className="my-8 container mx-auto px-4"></hr>
            <List blogs={blogs} />
            <hr className="my-8 container mx-auto px-4"></hr>
            <Partners />
            <hr className="my-8 container mx-auto px-4"></hr>
            <List categories={categories} />