This commit is contained in:
jahooma 2022-01-27 00:38:22 -06:00
parent da695c33f4
commit 769763d006
6 changed files with 11 additions and 15 deletions

View File

@ -128,7 +128,7 @@ export function BetPanel(props: {
const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0 const currentReturn = betAmount ? (currentPayout - betAmount) / betAmount : 0
const currentReturnPercent = (currentReturn * 100).toFixed() + '%' const currentReturnPercent = (currentReturn * 100).toFixed() + '%'
const panelTitle = title ?? `Buy ${betChoice || 'shares'}` const panelTitle = title ?? 'Place a trade'
if (title) { if (title) {
focusAmountInput() focusAmountInput()
} }
@ -138,13 +138,13 @@ export function BetPanel(props: {
className={clsx('bg-gray-100 shadow-md px-8 py-6 rounded-md', className)} className={clsx('bg-gray-100 shadow-md px-8 py-6 rounded-md', className)}
> >
<Title <Title
className={clsx('!mt-0 text-neutral', title ? '!text-xl' : '')} className={clsx('!mt-0', title ? '!text-xl' : '!text-neutral')}
text={panelTitle} text={panelTitle}
/> />
<div className="mt-2 mb-1 text-sm text-gray-500">Outcome</div> {/* <div className="mt-2 mb-1 text-sm text-gray-500">Outcome</div> */}
<YesNoSelector <YesNoSelector
className="my-2" className="mb-4"
selected={betChoice} selected={betChoice}
onSelect={(choice) => onBetChoice(choice)} onSelect={(choice) => onBetChoice(choice)}
/> />

View File

@ -13,7 +13,6 @@ import { parseTags } from '../../common/util/parse'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { TrendingUpIcon } from '@heroicons/react/solid' import { TrendingUpIcon } from '@heroicons/react/solid'
import { DateTimeTooltip } from './datetime-tooltip' import { DateTimeTooltip } from './datetime-tooltip'
import { CompactTagsList } from './tags-list'
import { ClockIcon } from '@heroicons/react/outline' import { ClockIcon } from '@heroicons/react/outline'
import { fromNow } from '../lib/util/time' import { fromNow } from '../lib/util/time'

View File

@ -28,10 +28,7 @@ export function FollowFoldButton(props: { fold: Fold; className?: string }) {
if (following) { if (following) {
return ( return (
<button <button
className={clsx( className={clsx('btn btn-outline btn-sm', className)}
'btn btn-primary btn-sm hover:bg-red-500 hover:border-red-500',
className
)}
onClick={onUnfollow} onClick={onUnfollow}
> >
Following Following

View File

@ -7,11 +7,11 @@ import {
listenForFollow, listenForFollow,
} from '../lib/firebase/folds' } from '../lib/firebase/folds'
export const useFold = (foldId: string) => { export const useFold = (foldId: string | undefined) => {
const [fold, setFold] = useState<Fold | null | undefined>() const [fold, setFold] = useState<Fold | null | undefined>()
useEffect(() => { useEffect(() => {
return listenForFold(foldId, setFold) if (foldId) return listenForFold(foldId, setFold)
}, [foldId]) }, [foldId])
return fold return fold

View File

@ -139,7 +139,7 @@ export default function FoldPage(props: {
const page = (slugs[1] ?? 'activity') as typeof foldSubpages[number] const page = (slugs[1] ?? 'activity') as typeof foldSubpages[number]
const fold = useFold(props.fold?.id ?? '') ?? props.fold const fold = useFold(props.fold?.id) ?? props.fold
const { query, setQuery, sort, setSort } = useQueryAndSortParams({ const { query, setQuery, sort, setSort } = useQueryAndSortParams({
defaultSort: 'most-traded', defaultSort: 'most-traded',
@ -237,7 +237,7 @@ export default function FoldPage(props: {
/> />
)} )}
</Col> </Col>
<Col className="hidden md:flex max-w-xs gap-10"> <Col className="hidden md:flex max-w-xs w-full gap-10">
<FoldOverview fold={fold} curator={curator} /> <FoldOverview fold={fold} curator={curator} />
<FoldLeaderboards <FoldLeaderboards
topTraders={topTraders} topTraders={topTraders}
@ -268,7 +268,7 @@ function FoldOverview(props: { fold: Fold; curator: User }) {
const { about, tags } = fold const { about, tags } = fold
return ( return (
<Col className="max-w-sm"> <Col>
<div className="px-4 py-3 bg-indigo-500 text-white text-sm rounded-t"> <div className="px-4 py-3 bg-indigo-500 text-white text-sm rounded-t">
About community About community
</div> </div>

View File

@ -93,7 +93,7 @@ function FoldCard(props: { fold: Fold; curator: User | undefined }) {
return ( return (
<Col <Col
key={fold.id} key={fold.id}
className="bg-white p-4 rounded-xl gap-1 shadow-md relative" className="bg-white hover:bg-gray-100 p-4 rounded-xl gap-1 shadow-md relative"
> >
<Link href={foldPath(fold)}> <Link href={foldPath(fold)}>
<a className="absolute left-0 right-0 top-0 bottom-0" /> <a className="absolute left-0 right-0 top-0 bottom-0" />