-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,19 +26,6 @@ const ListMerch = () => { | |
} | ||
} | ||
|
||
// //get merch function | ||
// const getMerch = async (id: number) => { | ||
// try { | ||
// const response = await fetch(`http://localhost:3001/admin/admin-merch/${id}`); | ||
// const jsonData = await response.json(); | ||
|
||
// setMerches(jsonData); | ||
// } catch (err) { | ||
// console.error(getErrorMessage(err)); | ||
// } | ||
// } | ||
|
||
//get all merch function | ||
const getAllMerches = async () => { | ||
try { | ||
const response = await fetch("http://localhost:3001/admin/admin-merch"); | ||
|
@@ -65,26 +52,13 @@ const ListMerch = () => { | |
</tr> | ||
</thead> | ||
<tbody> | ||
{/* | ||
<tr> | ||
<td>John</td> | ||
<td>Doe</td> | ||
<td>[email protected]</td> | ||
</tr> | ||
*/} | ||
{merches.map(merch => ( | ||
<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">P {merch.price}</td> | ||
<td> | ||
{/* <a | ||
className="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800" | ||
href="http://localhost:3000/admin/admin-editMerch" | ||
> | ||
Edit | ||
</a> */} | ||
<EditMerch merch={merch} /> | ||
</td> | ||
<td> | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.