Revert "Publicly display bets placed after 06-01-2022"
This reverts commit a4330cfdf2
.
This commit is contained in:
parent
a4330cfdf2
commit
5bcff4171b
|
@ -52,12 +52,9 @@ import { NumericContract } from 'common/contract'
|
||||||
type BetSort = 'newest' | 'profit' | 'closeTime' | 'value'
|
type BetSort = 'newest' | 'profit' | 'closeTime' | 'value'
|
||||||
type BetFilter = 'open' | 'sold' | 'closed' | 'resolved' | 'all'
|
type BetFilter = 'open' | 'sold' | 'closed' | 'resolved' | 'all'
|
||||||
|
|
||||||
export function BetsList(props: { user: User; hideBetsBefore?: number }) {
|
export function BetsList(props: { user: User }) {
|
||||||
const { user, hideBetsBefore } = props
|
const { user } = props
|
||||||
let bets = useUserBets(user.id, { includeRedemptions: true })
|
const bets = useUserBets(user.id, { includeRedemptions: true })
|
||||||
// Hide bets before 06-01-2022 if this isn't your own profile
|
|
||||||
// NOTE: This means profits shown are only starting 06-01-2022 as well.
|
|
||||||
bets = (bets ?? []).filter((bet) => bet.createdTime >= (hideBetsBefore ?? 0))
|
|
||||||
const [contracts, setContracts] = useState<Contract[] | undefined>()
|
const [contracts, setContracts] = useState<Contract[] | undefined>()
|
||||||
|
|
||||||
const [sort, setSort] = useState<BetSort>('newest')
|
const [sort, setSort] = useState<BetSort>('newest')
|
||||||
|
|
|
@ -44,7 +44,6 @@ export function UserLink(props: {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TAB_IDS = ['markets', 'comments', 'bets']
|
export const TAB_IDS = ['markets', 'comments', 'bets']
|
||||||
const JUNE_1_2022 = new Date('2022-06-01T00:00:00.000Z').valueOf()
|
|
||||||
|
|
||||||
export function UserPage(props: {
|
export function UserPage(props: {
|
||||||
user: User
|
user: User
|
||||||
|
@ -230,27 +229,14 @@ export function UserPage(props: {
|
||||||
title: 'Bets',
|
title: 'Bets',
|
||||||
content: (
|
content: (
|
||||||
<div>
|
<div>
|
||||||
{isCurrentUser && (
|
<AlertBox
|
||||||
<AlertBox
|
title="Bets are becoming publicly visible on 2022-06-01"
|
||||||
title="Bets after 2022-06-01 are publicly visible by default."
|
text="Bettor identities have always been traceable through the Manifold API.
|
||||||
text="Note that all historical bets are also publicly accessible through the API.
|
However, our interface implied that they were private.
|
||||||
See: https://manifold.markets/Austin/will-all-bets-on-manifold-be-public"
|
As we develop new features such as leaderboards and bet history, it won't be technically feasible to keep this info private.
|
||||||
/>
|
For more context, or if you'd like to wipe your bet history, see: https://manifold.markets/Austin/will-all-bets-on-manifold-be-public"
|
||||||
)}
|
|
||||||
<BetsList
|
|
||||||
user={user}
|
|
||||||
hideBetsBefore={isCurrentUser ? 0 : JUNE_1_2022}
|
|
||||||
/>
|
/>
|
||||||
{!isCurrentUser && (
|
{isCurrentUser && <BetsList user={user} />}
|
||||||
<>
|
|
||||||
<Spacer h={4} />
|
|
||||||
<AlertBox
|
|
||||||
title="Bets before 2022-06-01 are hidden by default."
|
|
||||||
text="Note that all historical bets are also publicly accessible through the API.
|
|
||||||
See: https://manifold.markets/Austin/will-all-bets-on-manifold-be-public"
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
tabIcon: (
|
tabIcon: (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user