diff --git a/app/components/Admin/Header.vue b/app/components/Admin/Header.vue
index 07e3d00..1333b3f 100644
--- a/app/components/Admin/Header.vue
+++ b/app/components/Admin/Header.vue
@@ -32,7 +32,10 @@
class="max-lg:hidden"
:ui="{ base: 'py-5', active: 'after:bg-black dark:after:bg-white' }"
/>
-
+
diff --git a/app/components/Admin/TestimonialsTable.vue b/app/components/Admin/TestimonialsTable.vue
new file mode 100644
index 0000000..d2c88ed
--- /dev/null
+++ b/app/components/Admin/TestimonialsTable.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ loading ? "Loading testimonials..." : "No testimonials found" }}
+
+
+
+
+
+
+
+
+
+
+ {{ row.author.name }}
+
+
+
+
+ {{ row.author.description }}
+
+
+
+
+ {{ row.title }}
+
+
+
+
+ {{ row.quote }}
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/Home/Testimonials.vue b/app/components/Home/Testimonials.vue
index 3389619..4f3955a 100644
--- a/app/components/Home/Testimonials.vue
+++ b/app/components/Home/Testimonials.vue
@@ -54,110 +54,7 @@
diff --git a/app/pages/admin/testimonials.vue b/app/pages/admin/testimonials.vue
new file mode 100644
index 0000000..3611561
--- /dev/null
+++ b/app/pages/admin/testimonials.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+ Add Testimonial
+
+
+
+
+
+
+
+
+
+
Add Testimonial
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+
+
+
+
+
+
diff --git a/server/api/admin/testimonials.patch.ts b/server/api/admin/testimonials.patch.ts
new file mode 100644
index 0000000..96f5b2d
--- /dev/null
+++ b/server/api/admin/testimonials.patch.ts
@@ -0,0 +1,15 @@
+export default defineEventHandler(async (event) => {
+ const { user } = await requireUserSession(event);
+ if (!user.admin) {
+ throw createError({
+ statusCode: 403,
+ message: "You are not authorized to perform this action",
+ });
+ }
+ const { testimonials = [] } = await readBody(event);
+
+ await hubKV().setItem("testimonials", testimonials);
+ return {
+ success: true,
+ };
+})
diff --git a/server/api/testimonials.get.ts b/server/api/testimonials.get.ts
new file mode 100644
index 0000000..7107b7e
--- /dev/null
+++ b/server/api/testimonials.get.ts
@@ -0,0 +1,5 @@
+export default defineEventHandler(async (event) => {
+ return hubKV().getItem("testimonials", {
+ defaultValue: [],
+ });
+})
diff --git a/types/testimonial.d.ts b/types/testimonial.d.ts
new file mode 100644
index 0000000..501e61a
--- /dev/null
+++ b/types/testimonial.d.ts
@@ -0,0 +1,12 @@
+type Testimonial = {
+ title: string
+ quote: string
+ author: {
+ name: string
+ description: string
+ avatar: {
+ src: string
+ loading: "lazy"
+ }
+ }
+}