mirror of
https://github.com/rowyio/rowy.git
synced 2026-07-12 05:19:40 +02:00
set firebase project id without .env
This commit is contained in:
@@ -23,7 +23,7 @@ import CheckIcon from "@material-ui/icons/Check";
|
||||
import { useAppContext } from "contexts/AppContext";
|
||||
import routes from "constants/routes";
|
||||
import meta from "../../../package.json";
|
||||
|
||||
import {projectId} from '../../firebase'
|
||||
const useStyles = makeStyles((theme) =>
|
||||
createStyles({
|
||||
spacer: {
|
||||
@@ -141,7 +141,7 @@ export default function UserMenu(props: IconButtonProps) {
|
||||
>
|
||||
<MenuItem
|
||||
component="a"
|
||||
href={`https://console.firebase.google.com/project/${process.env.REACT_APP_FIREBASE_PROJECT_ID}/firestore/data~2F_FT_USERS~2F${currentUser.uid}`}
|
||||
href={`https://console.firebase.google.com/project/${projectId}/firestore/data~2F_FT_USERS~2F${currentUser.uid}`}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
|
||||
@@ -16,7 +16,7 @@ import FieldSkeleton from "./FieldSkeleton";
|
||||
|
||||
import { FieldType } from "constants/fields";
|
||||
import { getFieldProp } from "components/fields";
|
||||
|
||||
import {projectId} from '../../../firebase'
|
||||
const useStyles = makeStyles((theme) =>
|
||||
createStyles({
|
||||
header: {
|
||||
@@ -104,7 +104,7 @@ export default function FieldWrapper({
|
||||
<IconButton
|
||||
component="a"
|
||||
href={`https://console.firebase.google.com/project/${
|
||||
process.env.REACT_APP_FIREBASE_PROJECT_ID
|
||||
projectId
|
||||
}/firestore/data~2F${(debugText as string).replace(
|
||||
/\//g,
|
||||
"~2F"
|
||||
|
||||
@@ -8,7 +8,7 @@ import HelperText from "../HelperText";
|
||||
import { Link, Typography } from "@material-ui/core";
|
||||
import OpenInNewIcon from "@material-ui/icons/OpenInNew";
|
||||
import { MONO_FONT } from "Themes";
|
||||
|
||||
import {projectId} from '../../firebase'
|
||||
export const tableSettings = (
|
||||
mode: TableSettingsDialogModes | null,
|
||||
roles: string[] | undefined,
|
||||
@@ -32,7 +32,7 @@ export const tableSettings = (
|
||||
description: (
|
||||
<HelperText>
|
||||
<Link
|
||||
href={`https://console.firebase.google.com/project/${process.env.REACT_APP_FIREBASE_PROJECT_ID}/firestore/data`}
|
||||
href={`https://console.firebase.google.com/project/${projectId}/firestore/data`}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
|
||||
@@ -20,6 +20,7 @@ db.enablePersistence({ synchronizeTabs: true });
|
||||
export const bucket = firebase.storage();
|
||||
export const functions = firebase.functions();
|
||||
|
||||
export const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID
|
||||
export const WEBHOOK_URL = `https://${(functions as any).region_}-${
|
||||
appConfig.projectId
|
||||
}.cloudfunctions.net/webhook`;
|
||||
|
||||
@@ -8,6 +8,7 @@ import { FireTableFilter, FiretableOrderBy } from ".";
|
||||
import { SnackContext } from "contexts/SnackContext";
|
||||
import { cloudFunction } from "../../firebase/callables";
|
||||
import { isCollectionGroup, generateSmallerId } from "utils/fns";
|
||||
import {projectId} from '../../firebase'
|
||||
const CAP = 1000; // safety paramter sets the upper limit of number of docs fetched by this hook
|
||||
const serverTimestamp = firebase.firestore.FieldValue.serverTimestamp;
|
||||
|
||||
@@ -101,7 +102,7 @@ const useTable = (initialOverrides: any) => {
|
||||
//TODO:callable to create new index
|
||||
if (error?.message.includes("indexes?create_composite=")) {
|
||||
const url =
|
||||
`https://console.firebase.google.com/project/${process.env.REACT_APP_FIREBASE_PROJECT_ID}/database/firestore/` +
|
||||
`https://console.firebase.google.com/project/${projectId}/database/firestore/` +
|
||||
"indexes?create_composite=" +
|
||||
error.message.split("indexes?create_composite=")[1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user