dsfoisadfje

Untitled

Nov 13th, 2024
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import data from "../data/data.json";
  2. import Card from "./Card";
  3.  
  4. function Dashboard() {
  5.   // console.log(data); <- We don't need to log the data anymore
  6.   // Insert state to store items, initialized with data from JSON file
  7.   return (
  8.     <div className="relative my-12 flex flex-col items-center">
  9.       {/* TITLE */}
  10.       <h1 className="poppins-bold flex-row text-2xl">Who's Invited?</h1>
  11.      <hr className="mb-4 mt-2 w-1/3 border-black" />
  12.  
  13.      {/* Event List Grid */}
  14.      <div className="relative z-10 grid sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
  15.        {/* Map through objects and render a Card component for each */}
  16.        {data.map((object) => (
  17.          <Card
  18.            key={object.id}
  19.            name={object.name}
  20.            img={object.img}
  21.            status={object.status}
  22.            bringing={object.bringing}
  23.          />
  24.        ))}
  25.      </div>
  26.    </div>
  27.  );
  28. }
  29.  
  30. export default Dashboard;
  31.  
Advertisement
Add Comment
Please, Sign In to add comment