Rename access.ts to envs/constants.ts

This commit is contained in:
Austin Chen 2022-03-07 20:52:10 -08:00
parent dcafb50e06
commit 22799d1c3c
15 changed files with 17 additions and 17 deletions

View File

@ -1,6 +1,6 @@
import { DEV_CONFIG } from './envs/dev'
import { EnvConfig, PROD_CONFIG } from './envs/prod'
import { THEOREMONE_CONFIG } from './envs/theoremone'
import { DEV_CONFIG } from './dev'
import { EnvConfig, PROD_CONFIG } from './prod'
import { THEOREMONE_CONFIG } from './theoremone'
const ENV = process.env.NEXT_PUBLIC_FIREBASE_ENV ?? 'PROD'

View File

@ -1,4 +1,4 @@
import { ENV_CONFIG } from '../access'
import { ENV_CONFIG } from '../envs/constants'
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',

View File

@ -14,7 +14,7 @@ import {
cleanUsername,
} from '../../common/util/clean-username'
import { sendWelcomeEmail } from './emails'
import { isWhitelisted } from '../../common/access'
import { isWhitelisted } from '../../common/envs/constants'
export const createUser = functions
.runWith({ minInstances: 1 })

View File

@ -1,5 +1,5 @@
import _ = require('lodash')
import { DOMAIN, PROJECT_ID } from '../../common/access'
import { DOMAIN, PROJECT_ID } from '../../common/envs/constants'
import { Answer } from '../../common/answer'
import { Bet } from '../../common/bet'
import { getProbability } from '../../common/calculate'

View File

@ -9,7 +9,7 @@ import { Contract } from '../../common/contract'
import { Col } from './layout/col'
import clsx from 'clsx'
import { Row } from './layout/row'
import { ENV_CONFIG } from '../../common/access'
import { ENV_CONFIG } from '../../common/envs/constants'
export function FeedPromo(props: { hotContracts: Contract[] }) {
const { hotContracts } = props

View File

@ -2,7 +2,7 @@ import Link from 'next/link'
import clsx from 'clsx'
import { useUser } from '../hooks/use-user'
import { ENV_CONFIG } from '../../common/access'
import { ENV_CONFIG } from '../../common/envs/constants'
export function ManifoldLogo(props: {
className?: string

View File

@ -3,7 +3,7 @@ import { formatMoney } from '../../common/util/format'
import { Avatar } from './avatar'
import { Col } from './layout/col'
import { MenuButton } from './menu'
import { IS_PRIVATE_MANIFOLD } from '../../common/access'
import { IS_PRIVATE_MANIFOLD } from '../../common/envs/constants'
export function ProfileMenu(props: { user: User | undefined }) {
const { user } = props

View File

@ -1,4 +1,4 @@
import { isAdmin } from '../../common/access'
import { isAdmin } from '../../common/envs/constants'
import { usePrivateUser, useUser } from './use-user'
export const useAdmin = () => {

View File

@ -1,7 +1,7 @@
import _ from 'lodash'
import { useRouter } from 'next/router'
import { useState, useEffect } from 'react'
import { IS_PRIVATE_MANIFOLD } from '../../common/access'
import { IS_PRIVATE_MANIFOLD } from '../../common/envs/constants'
type PropzProps = {
params: any

View File

@ -1,6 +1,6 @@
import { getFirestore } from '@firebase/firestore'
import { initializeApp, getApps, getApp } from 'firebase/app'
import { FIREBASE_CONFIG } from '../../../common/access'
import { FIREBASE_CONFIG } from '../../../common/envs/constants'
// Initialize Firebase
export const app = getApps().length ? getApp() : initializeApp(FIREBASE_CONFIG)

View File

@ -1,4 +1,4 @@
import { PROJECT_ID } from '../../../common/access'
import { PROJECT_ID } from '../../../common/envs/constants'
export const checkoutURL = (
userId: string,

View File

@ -1,4 +1,4 @@
import { IS_PRIVATE_MANIFOLD } from '../../common/access'
import { IS_PRIVATE_MANIFOLD } from '../../common/envs/constants'
import { Page } from '../components/page'
import { Title } from '../components/title'

View File

@ -1,5 +1,5 @@
import { Html, Head, Main, NextScript } from 'next/document'
import { ENV_CONFIG } from '../../common/access'
import { ENV_CONFIG } from '../../common/envs/constants'
export default function Document() {
return (

View File

@ -1,6 +1,6 @@
import dayjs from 'dayjs'
import _ from 'lodash'
import { IS_PRIVATE_MANIFOLD } from '../../common/access'
import { IS_PRIVATE_MANIFOLD } from '../../common/envs/constants'
import { DailyCountChart } from '../components/analytics/charts'
import { Col } from '../components/layout/col'
import { Spacer } from '../components/layout/spacer'

View File

@ -26,7 +26,7 @@ import { fromPropz, usePropz } from '../hooks/use-propz'
import { useGetRecentBets, useRecentBets } from '../hooks/use-bets'
import { useActiveContracts } from '../hooks/use-contracts'
import { useRecentComments } from '../hooks/use-comments'
import { IS_PRIVATE_MANIFOLD } from '../../common/access'
import { IS_PRIVATE_MANIFOLD } from '../../common/envs/constants'
export const getStaticProps = fromPropz(getStaticPropz)
export async function getStaticPropz() {