From 7ce42774b7624cf03f8e20b1213f147c5ef137a2 Mon Sep 17 00:00:00 2001 From: cade Date: Sun, 20 Aug 2023 14:44:24 -0700 Subject: [PATCH] segment case, subject avatar upload bug fix --- app/(account)/subjects/_components/subject-form.tsx | 2 +- app/_components/crisp.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(account)/subjects/_components/subject-form.tsx b/app/(account)/subjects/_components/subject-form.tsx index 03e5fea9..c82d0dbc 100644 --- a/app/(account)/subjects/_components/subject-form.tsx +++ b/app/(account)/subjects/_components/subject-form.tsx @@ -62,7 +62,7 @@ const SubjectForm = ({ subject }: SubjectFormProps) => { await uploadSubjectAvatar({ avatar: values.avatar, - subjectId: values.id, + subjectId: subjectData.id, supabase, }); diff --git a/app/_components/crisp.tsx b/app/_components/crisp.tsx index 14ef1b6e..a33b2716 100644 --- a/app/_components/crisp.tsx +++ b/app/_components/crisp.tsx @@ -18,7 +18,7 @@ const Crisp = ({ crispSignature, user }: CrispProviderProps) => { C.user.setEmail(user.email as string, crispSignature); const meta = user.user_metadata; C.user.setNickname(`${meta.first_name} ${meta.last_name}`); - C.session.setSegments([meta.is_client ? 'Client' : 'Consultant'], true); + C.session.setSegments([meta.is_client ? 'client' : 'consultant'], true); C.load(); }, [crispSignature, user]);