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 - ? ( - <> - <Link href="/contract"> - <a className={clsx('text-base', themeClasses)}> - Create a market - </a> - </Link> + {user ? ( + <> + <Link href="/contract"> + <a className={clsx('text-base', themeClasses)}>Create a market</a> + </Link> - <Link href="/account"> - <a className={clsx('text-base', themeClasses)}> - {user.name} - </a> - </Link> - </> - ) - - : showLogin - ? <button - className={clsx('text-base', themeClasses)} - onClick={() => firebaseLogin()} - > - Sign In - </button> - - : <></> - } + <Link href="/account"> + <a className={clsx('text-base', themeClasses)}>{user.name}</a> + </Link> + </> + ) : showLogin ? ( + <button + className={clsx('text-base', themeClasses)} + onClick={() => firebaseLogin()} + > + Sign In + </button> + ) : ( + <></> + )} </> ) } @@ -79,10 +70,7 @@ export function Header(props: { darkBackground?: boolean }) { <Link href="/"> <a className="flex flex-row items-center align-items-center h-6 sm:h-10"> <div className="inline-block mr-3"> - <img - className="h-6 sm:h-10" - src="/logo-icon.svg" - /> + <img className="h-6 sm:h-10" src="/logo-icon.svg" /> </div> <span className={clsx( diff --git a/web/components/hero.tsx b/web/components/hero.tsx index 78c2f739..f56870f4 100644 --- a/web/components/hero.tsx +++ b/web/components/hero.tsx @@ -18,7 +18,8 @@ export const Hero = () => { </span> </h1> <p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl"> - 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 </p> <div className="mt-10 sm:mt-12"> <ConvertKitEmailForm /> 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() { <div className="card glass lg:card-side text-neutral-content bg-green-600 hover:bg-green-600 transition-all max-w-sm mx-auto my-12"> <figure className="p-6"> {user?.avatarUrl && ( - <img - src={user.avatarUrl} - className="rounded-lg shadow-lg" - /> + <img src={user.avatarUrl} className="rounded-lg shadow-lg" /> )} </figure> <div className="max-w-md card-body"> 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',