mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-09 08:09:46 -06:00
Merge branch 'main' of github.com:formbricks/formbricks into fix/safari-mobile
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
"use server";
|
||||
|
||||
import { updateProfile, deleteProfile } from "@formbricks/lib/services/profile";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { TProfileUpdateInput } from "@formbricks/types/v1/profile";
|
||||
|
||||
export async function profileEditAction(userId: string, data: Prisma.UserUpdateInput) {
|
||||
export async function profileEditAction(userId: string, data: Partial<TProfileUpdateInput>) {
|
||||
return await updateProfile(userId, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -241,6 +241,7 @@ export const useLinkSurveyUtils = (survey: Survey) => {
|
||||
const nextQuestionId = getNextQuestionId(answer);
|
||||
|
||||
if (nextQuestionId === "end") {
|
||||
setLoadingElement(false);
|
||||
setProgress(1);
|
||||
setFinished(true);
|
||||
clearStoredResponses(survey.id);
|
||||
|
||||
@@ -2,10 +2,17 @@ import z from "zod";
|
||||
|
||||
export const ZProfile = z.object({
|
||||
id: z.string(),
|
||||
name: z.string().nullish(),
|
||||
name: z.string().nullable(),
|
||||
email: z.string(),
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date(),
|
||||
});
|
||||
|
||||
export type TProfile = z.infer<typeof ZProfile>;
|
||||
|
||||
export const ZProfileUpdateInput = z.object({
|
||||
name: z.string().optional(),
|
||||
email: z.string().optional(),
|
||||
});
|
||||
|
||||
export type TProfileUpdateInput = z.infer<typeof ZProfileUpdateInput>;
|
||||
|
||||
Reference in New Issue
Block a user