get rid of onboarding requirements

This commit is contained in:
m5r
2021-10-16 00:24:28 +02:00
parent c8f707af9c
commit 3cc6f35071
33 changed files with 291 additions and 142 deletions

View File

@ -1,7 +1,7 @@
import type { FunctionComponent } from "react";
import { useRef } from "react";
import Modal, { ModalTitle } from "../../settings/components/modal";
import Modal, { ModalTitle } from "app/core/components/modal";
type Props = {
isHelpModalOpen: boolean;

View File

@ -30,7 +30,6 @@ export default resolver.pipe(resolver.zod(Body), resolver.authorize(), async ({
number: phoneNumber.phoneNumber,
},
});
context.session.$setPrivateData({ hasCompletedOnboarding: true });
const mainTwilioClient = twilio(organization.twilioAccountSid, organization.twilioAuthToken);
const apiKey = await mainTwilioClient.newKeys.create({ friendlyName: "Shellphone API key" });

View File

@ -40,7 +40,6 @@ export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
const phoneNumber = await db.phoneNumber.findFirst({ where: { organizationId: session.orgId } });
if (phoneNumber) {
await session.$setPublicData({ hasCompletedOnboarding: true });
return {
redirect: {
destination: Routes.Messages().pathname,

View File

@ -102,7 +102,6 @@ export const getServerSideProps: GetServerSideProps<Props> = async ({ req, res }
const phoneNumber = await db.phoneNumber.findFirst({ where: { organizationId: session.orgId } });
if (phoneNumber) {
await session.$setPublicData({ hasCompletedOnboarding: true });
return {
redirect: {
destination: Routes.Messages().pathname,

View File

@ -140,7 +140,6 @@ export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
const phoneNumber = await db.phoneNumber.findFirst({ where: { organizationId: session.orgId } });
if (phoneNumber) {
await session.$setPublicData({ hasCompletedOnboarding: true });
return {
redirect: {
destination: Routes.Messages().pathname,