From b0e32682a4590a896438b9a2f43f4eac3bd0f7e7 Mon Sep 17 00:00:00 2001 From: RafsanAmin Date: Fri, 11 Oct 2024 19:59:40 +0600 Subject: [PATCH] up again --- .../club/admin/eventEdit/[eventID]/page.tsx | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/app/club/admin/eventEdit/[eventID]/page.tsx b/src/app/club/admin/eventEdit/[eventID]/page.tsx index 0b00b43..dfe4372 100644 --- a/src/app/club/admin/eventEdit/[eventID]/page.tsx +++ b/src/app/club/admin/eventEdit/[eventID]/page.tsx @@ -300,6 +300,17 @@ const Page = ({ params }: { params: { eventID: string } }) => { goToAdminPanel(); }; + const save = async (event: any) => { + localStorage.setItem( + `event.${eventUID}`, + JSON.stringify({ + questions, + answers, + }), + ); + toast.info("Saved questions and answers."); + }; + const loadLocal = async () => { const local = JSON.parse(localStorage.getItem(`event.${eventUID}`) || "{}"); console.dir(local); @@ -701,6 +712,19 @@ const Page = ({ params }: { params: { eventID: string } }) => { )} +
+ +
@@ -723,7 +747,7 @@ const Page = ({ params }: { params: { eventID: string } }) => { {loading ? ( ) : ( - "Load Local Questions" + "Load Local Ques." )}