Merge pull request #1089 from iamanishroy/ui-update

ROWY-909: Update link in create table
This commit is contained in:
Shams
2023-01-25 21:51:24 +01:00
committed by GitHub
2 changed files with 33 additions and 10 deletions

View File

@@ -92,7 +92,17 @@ export default function SteppedAccordion({
}
{...labelButtonProps}
>
<StepLabel error={error} {...labelProps}>
<StepLabel
error={error}
{...labelProps}
StepIconProps={{
sx: {
"&.Mui-active": {
transform: "rotate(0deg) !important",
},
},
}}
>
{title}
{content && <ExpandIcon sx={{ mr: -0.5 }} />}
</StepLabel>

View File

@@ -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 (
<Link
href={`https://console.firebase.google.com/project/${projectId}/firestore/data`}
target="_blank"
rel="noopener noreferrer"
>
Your collections
<OpenInNewIcon />
</Link>
);
}
export const tableSettings = (
mode: TableSettingsDialogState["mode"],
roles: string[] | undefined,
@@ -105,14 +125,7 @@ export const tableSettings = (
) : (
"Choose which Firestore collection to display."
)}{" "}
<Link
href={`https://console.firebase.google.com/project/_/firestore/data`}
target="_blank"
rel="noopener noreferrer"
>
Your collections
<OpenInNewIcon />
</Link>
<CollectionLink />
</>
),
AddButtonProps: {