diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 0dd9f722..3c40dbfb 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -1,4 +1,4 @@ -import { getFunctions, httpsCallable } from "firebase/functions" +import { getFunctions, httpsCallable } from 'firebase/functions' import clsx from 'clsx' import React, { useState } from 'react' @@ -33,7 +33,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) { const result = await placeBet({ amount: betAmount, outcome: betChoice, - contractId: contract.id + contractId: contract.id, }) console.log('placed bet. Result:', result) @@ -125,6 +125,5 @@ export function BetPanel(props: { contract: Contract; className?: string }) { ) } - const functions = getFunctions() export const placeBet = httpsCallable(functions, 'placeBet') diff --git a/web/components/header.tsx b/web/components/header.tsx index 7b520304..c8fa559c 100644 --- a/web/components/header.tsx +++ b/web/components/header.tsx @@ -24,8 +24,6 @@ function SignInLink(props: { darkBackground?: boolean }) { ? 'text-white hover:text-gray-300' : 'hover:text-gray-500' - - const [showLogin, setShowLogin] = useState(false) useEffect(() => { setShowLogin(location.search.includes('demo')) @@ -33,33 +31,26 @@ function SignInLink(props: { darkBackground?: boolean }) { return ( <> - {user - ? ( - <> - - - Create a market - - + {user ? ( + <> + + Create a market + - - - {user.name} - - - - ) - - : showLogin - ? - - : <> - } + + {user.name} + + + ) : showLogin ? ( + + ) : ( + <> + )} ) } @@ -79,10 +70,7 @@ export function Header(props: { darkBackground?: boolean }) {
- +
{

- Forecast the future with play-money prediction markets for you and your community + Forecast the future with play-money prediction markets for + you and your community

diff --git a/web/lib/firebase/contracts.ts b/web/lib/firebase/contracts.ts index 0d74bb18..1273c07b 100644 --- a/web/lib/firebase/contracts.ts +++ b/web/lib/firebase/contracts.ts @@ -22,7 +22,7 @@ export type Contract = { outcomeType: 'BINARY' // | 'MULTI' | 'interval' | 'date' // outcomes: ['YES', 'NO'] seedAmounts: { YES: number; NO: number } // seedBets: [number, number] - pot: { YES: number; NO: number } + pot: { YES: number; NO: number } createdTime: number // Milliseconds since epoch lastUpdatedTime: number // If the question or description was changed diff --git a/web/pages/account.tsx b/web/pages/account.tsx index 94ebd1a2..f210bd3b 100644 --- a/web/pages/account.tsx +++ b/web/pages/account.tsx @@ -24,10 +24,7 @@ export default function Account() {
{user?.avatarUrl && ( - + )}
diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 2ea8587f..3a4c8354 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -22,7 +22,7 @@ module.exports = { themes: [ { mantic: { - 'primary': '#11b981', + primary: '#11b981', 'primary-focus': '#069668', // Foreground content color to use on primary color 'primary-content': '#ffffff',