From 3e0b429292acc1603ee72b07c44906377d8a2eff Mon Sep 17 00:00:00 2001
From: Anish Roy <62830866+iamanishroy@users.noreply.github.com>
Date: Sun, 22 Jan 2023 11:49:41 +0000
Subject: [PATCH] Updated link in create table
---
src/components/TableSettingsDialog/form.tsx | 31 +++++++++++++++------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/src/components/TableSettingsDialog/form.tsx b/src/components/TableSettingsDialog/form.tsx
index 4bd8a763..8cfcaa14 100644
--- a/src/components/TableSettingsDialog/form.tsx
+++ b/src/components/TableSettingsDialog/form.tsx
@@ -1,6 +1,11 @@
import { find } from "lodash-es";
+import { useAtom } from "jotai";
import { Field, FieldType } from "@rowy/form-builder";
-import { TableSettingsDialogState } from "@src/atoms/projectScope";
+import {
+ projectIdAtom,
+ projectScope,
+ TableSettingsDialogState,
+} from "@src/atoms/projectScope";
import { Link, ListItemText, Typography } from "@mui/material";
import OpenInNewIcon from "@src/components/InlineOpenInNewIcon";
@@ -9,6 +14,21 @@ import WarningIcon from "@mui/icons-material/WarningAmber";
import { WIKI_LINKS } from "@src/constants/externalLinks";
import { FieldType as TableFieldType } from "@src/constants/fields";
+function CollectionLink() {
+ const [projectId] = useAtom(projectIdAtom, projectScope);
+
+ return (
+
+ Your collections
+
+
+ );
+}
+
export const tableSettings = (
mode: TableSettingsDialogState["mode"],
roles: string[] | undefined,
@@ -105,14 +125,7 @@ export const tableSettings = (
) : (
"Choose which Firestore collection to display."
)}{" "}
-
- Your collections
-
-
+
>
),
AddButtonProps: {