Rename access.ts to envs/constants.ts
This commit is contained in:
parent
dcafb50e06
commit
22799d1c3c
|
@ -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'
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { ENV_CONFIG } from '../access'
|
||||
import { ENV_CONFIG } from '../envs/constants'
|
||||
|
||||
const formatter = new Intl.NumberFormat('en-US', {
|
||||
style: 'currency',
|
||||
|
|
|
@ -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 })
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { isAdmin } from '../../common/access'
|
||||
import { isAdmin } from '../../common/envs/constants'
|
||||
import { usePrivateUser, useUser } from './use-user'
|
||||
|
||||
export const useAdmin = () => {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PROJECT_ID } from '../../../common/access'
|
||||
import { PROJECT_ID } from '../../../common/envs/constants'
|
||||
|
||||
export const checkoutURL = (
|
||||
userId: string,
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user