Skip to content

Commit

Permalink
moving products to data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lmac-1 committed Feb 17, 2023
1 parent a8e8af7 commit a0920d4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
30 changes: 30 additions & 0 deletions data/products.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export const products = [
{
id: 1,
name: "Watermelon",
price: "£1.00",
emoji: "🍉",
currency: "GBP",
},
{
id: 2,
name: "Apple",
price: "£0.20",
emoji: "🍎",
currency: "GBP",
},
{
id: 3,
name: "Pineapple",
price: "£1.05",
emoji: "🍍",
currency: "GBP",
},
{
id: 4,
name: "Banana",
price: "£0.20",
emoji: "🍌",
currency: "GBP",
},
];
8 changes: 1 addition & 7 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import Product from "@/components/Product";

const products = [
{ id: 1, name: "Watermelon", price: "£1.00", emoji: "🍉" },
{ id: 2, name: "Apple", price: "£0.20", emoji: "🍎" },
{ id: 3, name: "Pineapple", price: "£1.05", emoji: "🍍" },
{ id: 4, name: "Banana", price: "£0.20", emoji: "🍌" },
];
import { products } from "@/data/products";

export default function Home() {
return (
Expand Down

0 comments on commit a0920d4

Please sign in to comment.