FIX:prevent crashing when creating the first table

This commit is contained in:
Shams mosowi
2020-12-11 09:57:37 +08:00
parent 83a2336a3d
commit faa2e6b976
3 changed files with 5 additions and 7 deletions

View File

@@ -1,17 +1,17 @@
import React, { useState } from "react";
import SettingsMenu from "./Menu";
import Webhooks from "./Webhooks";
//import Webhooks from "./Webhooks";
export default function Settings() {
const [modal, setModal] = useState("");
return (
<>
<SettingsMenu modal={modal} setModal={setModal} />
<Webhooks
{/* <Webhooks
open={modal === "Webhooks"}
handleClose={() => {
setModal("");
}}
/>
/> */}
</>
);
}

View File

@@ -110,7 +110,7 @@ export const tableSettings = (
type: FIELDS.multiSelect,
name: "roles",
label: "Accessed By*",
options: roles,
options: roles??[],
validation: yup.array().of(yup.string()).required("Required"),
freeText: true,
},
@@ -139,7 +139,7 @@ export const tableSettings = (
),
}),
() =>
mode === TableSettingsDialogModes.create && tables?.length !== 0
mode === TableSettingsDialogModes.create && tables &&tables?.length !== 0
? {
type: FIELDS.multiSelect,
name: "schemaSource",

View File

@@ -20,11 +20,9 @@ db.enablePersistence({ synchronizeTabs: true });
export const bucket = firebase.storage();
export const functions = firebase.functions();
console.log({ functions });
export const WEBHOOK_URL = `https://${(functions as any).region_}-${
appConfig.projectId
}.cloudfunctions.net/webhook`;
console.log({ WEBHOOK_URL });
export const googleProvider = new firebase.auth.GoogleAuthProvider().setCustomParameters(
{
prompt: "select_account",