mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-29 03:13:19 -05:00
Dramatically improve load times when creating a new team(#614)
* fix: attempts to reduce time taken to create team * fix: fixes long time taken in team creation * fix: refactors prisma logic * feat: added logic for adding demo data while signing up * fix: adds comment * fix: adds another logic for adding demo data * fix: adds service for adding demo data * fix: fixes * fix: adds demo product creation logic in next auth options * fix: fixes next auth options * fix: fixes team creation logic * refactor: clean up * fix: moves the logic for adding demo product while creating team in bg * fix: moves individual queries in a transaction * refactor: service * fix: moves api route to app-dir * fix: fixes api calls * fix: fixes cache * fix: removes unused code
This commit is contained in:
@@ -27,7 +27,9 @@ export const SignupForm = () => {
|
||||
if (!isValid) {
|
||||
return;
|
||||
}
|
||||
|
||||
setSigningUp(true);
|
||||
|
||||
try {
|
||||
await createUser(
|
||||
e.target.elements.name.value,
|
||||
|
||||
@@ -25,6 +25,7 @@ export default function CreateTeamModal({ open, setOpen }: CreateTeamModalProps)
|
||||
const submitTeam = async (data) => {
|
||||
setLoading(true);
|
||||
const newTeam = await createTeam(data.name, (profile as any).id);
|
||||
|
||||
const newMemberships = await mutateMemberships();
|
||||
changeEnvironmentByTeam(newTeam.id, newMemberships, router);
|
||||
toast.success("Team created successfully!");
|
||||
|
||||
Reference in New Issue
Block a user