← Problems
import "./App.css";
import { Header } from "./components/Header";
import { ProductCard } from "./components/ProductCard";
import { products } from "./data/products";

export default function App() {
  return (
    <div data-section="page" className="mx-auto w-[1100px] px-6">
      <Header />

      <section data-section="hero" className="flex items-center gap-12 py-12">
        <div data-section="hero-text" className="w-[520px]">
          <h1 className="mb-4 text-6xl font-bold leading-tight">Gear for the way you work</h1>
          <p className="mb-6 text-lg text-stone-600">
            Desks, lamps and bags built to last. Free delivery on orders over $50.
          </p>
          <a className="inline-block rounded-full bg-gray-800 px-5 py-3 text-white" href="#shop">
            Shop the range
          </a>
        </div>
        <div
          data-section="hero-art"
          role="img"
          aria-label="A tidy desk with a lamp"
          className="hero-art h-80 w-[480px] shrink-0 rounded-2xl"
        />
      </section>

      <section id="shop">
        <h2 className="mb-4 text-2xl font-semibold">Best sellers</h2>
        <div data-section="grid" className="grid grid-cols-3 gap-6">
          {products.map((product) => (
            <ProductCard key={product.id} product={product} />
          ))}
        </div>
      </section>

      <footer data-section="footer" className="mt-12 grid grid-cols-3 gap-6 border-t border-stone-200 py-12">
        <div>
          <h3 className="font-semibold">Shop</h3>
          <p className="text-stone-500">Desks, lighting, bags</p>
        </div>
        <div>
          <h3 className="font-semibold">Help</h3>
          <p className="text-stone-500">Delivery, returns, contact us</p>
        </div>
        <div>
          <h3 className="font-semibold">Company</h3>
          <p className="text-stone-500">About, careers, press</p>
        </div>
      </footer>
    </div>
  );
}

PreviewOpen in new tab ↗Tests

Tests only run when you press ▶ Run tests (next to the Tests heading). Run them again after each change.

Open browser consoleTests

/src/App.jsJS