Skip to content

Commit

Permalink
Merge pull request #25 from cezro/add/admin-merch-Image-CRUD
Browse files Browse the repository at this point in the history
add/admin merch-image preview
  • Loading branch information
bit-Matt authored Jan 3, 2024
2 parents 9edae03 + 128f909 commit 0f9c94b
Show file tree
Hide file tree
Showing 6 changed files with 558 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
.DS_Store
*.pem

# Image folder upload
uploads

# debug
npm-debug.log*
yarn-debug.log*
Expand Down
6 changes: 4 additions & 2 deletions client/components/ListMerch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ListMerch = () => {
<tr>
<th className="px-4 py-2">Merch Name</th>
<th className="px-4 py-2">Description</th>
{/* <th className="px-4 py-2">Image</th> */}
<th className="px-4 py-2">Image</th>
<th className="px-4 py-2">Price</th>
<th className="px-4 py-2">Edit</th>
<th className="px-4 py-2">Delete</th>
Expand All @@ -59,7 +59,9 @@ const ListMerch = () => {
<tr key={merch.id}>
<td className="border px-4 py-2">{merch.name}</td>
<td className="border px-4 py-2">{merch.description}</td>
{/* <td className="border px-4 py-2">{merch.image}</td> */}
<td className="border px-4 py-2">
<img src={`http://localhost:3001/${merch.image}`} alt={merch.name} />
</td>
<td className="border px-4 py-2">P {merch.price}</td>
<td>
<EditMerch merch={merch} />
Expand Down
Loading

0 comments on commit 0f9c94b

Please sign in to comment.