diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx
index bf9913fa..565a5219 100644
--- a/web/components/bet-panel.tsx
+++ b/web/components/bet-panel.tsx
@@ -1,6 +1,5 @@
import React, { useState } from 'react'
import { Contract } from '../lib/firebase/contracts'
-import { Button } from './button'
import { Col } from './layout/col'
import { Spacer } from './layout/spacer'
import { YesNoSelector } from './yes-no-selector'
@@ -8,7 +7,7 @@ import { YesNoSelector } from './yes-no-selector'
export function BetPanel(props: { contract: Contract; className?: string }) {
const { contract, className } = props
- const [betChoice, setBetChoice] = useState<'yes' | 'no'>('yes')
+ const [betChoice, setBetChoice] = useState<'YES' | 'NO'>('YES')
const [shares, setShares] = useState(0)
return (
@@ -40,13 +39,13 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
Price
- {shares * (betChoice === 'yes' ? 57 : 43)} points
+ {shares * (betChoice === 'YES' ? 57 : 43)} points
{shares !== 0 && (
-
+
)}
)
diff --git a/web/components/button.tsx b/web/components/button.tsx
deleted file mode 100644
index d7e40579..00000000
--- a/web/components/button.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-export function Button(props: {
- className?: string
- onClick?: () => void
- color: 'green' | 'red' | 'deemphasized'
- hideFocusRing?: boolean
- children?: any
-}) {
- const { className, onClick, children, color, hideFocusRing } = props
-
- return (
-
- )
-}
-
-function classNames(...classes: any[]) {
- return classes.filter(Boolean).join(' ')
-}
diff --git a/web/components/yes-no-selector.tsx b/web/components/yes-no-selector.tsx
index d83a04c3..632e5b54 100644
--- a/web/components/yes-no-selector.tsx
+++ b/web/components/yes-no-selector.tsx
@@ -1,10 +1,9 @@
import React from 'react'
-import { Button } from './button'
import { Row } from './layout/row'
export function YesNoSelector(props: {
- selected: 'yes' | 'no'
- onSelect: (selected: 'yes' | 'no') => void
+ selected: 'YES' | 'NO'
+ onSelect: (selected: 'YES' | 'NO') => void
yesLabel?: string
noLabel?: string
className?: string
@@ -14,17 +13,17 @@ export function YesNoSelector(props: {
return (
)
}
+
+function Button(props: {
+ className?: string
+ onClick?: () => void
+ color: 'green' | 'red' | 'deemphasized'
+ hideFocusRing?: boolean
+ children?: any
+}) {
+ const { className, onClick, children, color, hideFocusRing } = props
+
+ return (
+
+ )
+}
+
+function classNames(...classes: any[]) {
+ return classes.filter(Boolean).join(' ')
+}