From a3e62cb036854f0d7d2548720fac1213e1a27af9 Mon Sep 17 00:00:00 2001 From: suryabulusu Date: Wed, 18 Sep 2024 17:20:47 +0530 Subject: [PATCH 1/3] regen links sns --- src/app/(home)/Table/Actions.tsx | 8 ++++---- src/services/services.ts | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/(home)/Table/Actions.tsx b/src/app/(home)/Table/Actions.tsx index 92b7557..bc2e72c 100644 --- a/src/app/(home)/Table/Actions.tsx +++ b/src/app/(home)/Table/Actions.tsx @@ -6,7 +6,7 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { absoluteLink } from '@/lib/utils'; -import { patchSession } from '@/services/services'; +import { patchSession, sendRegenerateSns } from '@/services/services'; import { type Session, STATUS } from '@/types'; import { AlertTriangle, Copy, LinkIcon, Loader, MoreHorizontal } from 'lucide-react'; import Link from 'next/link'; @@ -62,12 +62,12 @@ const TableActions = ({ session }: { session: Session }) => { {session.is_active ? 'Disable' : 'Enable'} Session - {/* + - */} + ); diff --git a/src/services/services.ts b/src/services/services.ts index d04a3c9..1890187 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -158,6 +158,8 @@ export async function createSession(formData: Session) { export const sendCreateSns = (id?: number) => publishMessage({ action: 'db_id', id }); +export const sendRegenerateSns = (id?: number) => publishMessage({actino: 'regenerate_quiz', id }); + /** * Patches a session on the server. * @param {Session} formData - The session data to be patched. From 77d5bee1552e7a027156655ec7445dbd11a09dcc Mon Sep 17 00:00:00 2001 From: suryabulusu Date: Wed, 18 Sep 2024 18:45:26 +0530 Subject: [PATCH 2/3] spell err --- src/services/services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/services.ts b/src/services/services.ts index 1890187..aafe9f3 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -158,7 +158,7 @@ export async function createSession(formData: Session) { export const sendCreateSns = (id?: number) => publishMessage({ action: 'db_id', id }); -export const sendRegenerateSns = (id?: number) => publishMessage({actino: 'regenerate_quiz', id }); +export const sendRegenerateSns = (id?: number) => publishMessage({action: 'regenerate_quiz', id }); /** * Patches a session on the server. From fa8e604605829179adc30e11f5fb07bfc70718ca Mon Sep 17 00:00:00 2001 From: suryabulusu Date: Wed, 18 Sep 2024 18:55:03 +0530 Subject: [PATCH 3/3] lint fix --- src/app/(home)/Table/Actions.tsx | 6 +++--- src/services/services.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/(home)/Table/Actions.tsx b/src/app/(home)/Table/Actions.tsx index bc2e72c..35931c9 100644 --- a/src/app/(home)/Table/Actions.tsx +++ b/src/app/(home)/Table/Actions.tsx @@ -62,10 +62,10 @@ const TableActions = ({ session }: { session: Session }) => { {session.is_active ? 'Disable' : 'Enable'} Session - +