Files
rowy/src/components/fields/User/index.tsx

31 lines
1013 B
TypeScript
Raw Normal View History

2022-05-24 16:17:09 +10:00
import { lazy } from "react";
import { IFieldConfig, FieldType } from "@src/components/fields/types";
2022-11-10 18:21:32 +11:00
import withTableCell from "@src/components/Table/withTableCell";
2022-05-24 16:17:09 +10:00
import UserIcon from "@mui/icons-material/PersonOutlined";
2022-11-10 18:21:32 +11:00
import DisplayCell from "./DisplayCell";
2022-05-24 16:17:09 +10:00
const SideDrawerField = lazy(
() =>
import("./SideDrawerField" /* webpackChunkName: "SideDrawerField-User" */)
);
const Settings = lazy(
() =>
import("../CreatedBy/Settings" /* webpackChunkName: "Settings-CreatedBy" */)
);
export const config: IFieldConfig = {
type: FieldType.user,
name: "User",
group: "Metadata",
dataType:
"{ displayName: string; email: string; emailVerified: boolean; isAnonymous: boolean; photoURL: string; uid: string; timestamp?: firebase.firestore.Timestamp; }",
initialValue: null,
icon: <UserIcon />,
description: "User information and optionally, timestamp. Read-only.",
2022-11-10 18:21:32 +11:00
TableCell: withTableCell(DisplayCell, null),
2022-05-24 16:17:09 +10:00
SideDrawerField,
settings: Settings,
};
export default config;