From ac3f09a16413b7d719b3be70c0d4ccc7d68749c3 Mon Sep 17 00:00:00 2001 From: Iwan Firmawan Date: Sun, 10 Sep 2023 21:19:57 +0700 Subject: [PATCH 1/2] [#130] Create json for data reviews --- assets/json/reviews.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 assets/json/reviews.json diff --git a/assets/json/reviews.json b/assets/json/reviews.json new file mode 100644 index 0000000..c10f322 --- /dev/null +++ b/assets/json/reviews.json @@ -0,0 +1,32 @@ +[ + { + "id": 111, + "star": 5, + "user": { + "id": 21, + "name": "dr. Cosmos O. Mangunsong, SpM(K)", + "photo": "https://randomuser.me/api/portraits/med/men/30.jpg" + }, + "message": "They delivered a product that was both functional and beautiful, and were a pleasure to work with throughout the process." + }, + { + "id": 112, + "star": 5, + "user": { + "id": 22, + "name": "Nizam K.", + "photo": "https://randomuser.me/api/portraits/men/96.jpg" + }, + "message": "Their team of experts provided the guidance and expertise we needed to succeed in a rapidly changing digital landscape." + }, + { + "id": 113, + "star": 5, + "user": { + "id": 23, + "name": "Sarah", + "photo": "https://randomuser.me/api/portraits/med/women/14.jpg" + }, + "message": "They understood our unique needs and created a plan that was both innovative and effective." + } +] \ No newline at end of file From 42c6f59093adabebc9a4d788fafbcc7688d22deb Mon Sep 17 00:00:00 2001 From: Iwan Firmawan Date: Sun, 10 Sep 2023 21:20:14 +0700 Subject: [PATCH 2/2] [#130] Create index reviews API --- pages/api/reviews.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pages/api/reviews.js diff --git a/pages/api/reviews.js b/pages/api/reviews.js new file mode 100644 index 0000000..7d3db39 --- /dev/null +++ b/pages/api/reviews.js @@ -0,0 +1,5 @@ +import data from '../../assets/json/reviews.json'; + +export default function handler(req, res) { + res.status(200).json(data); +}