@@ -110,6 +110,33 @@ function FeedBet(props: { activityItem: any; user: User | null }) {
)
}
+function FeedStart(props: { contract: Contract }) {
+ const { contract } = props
+ return (
+ <>
+
+
+
+ {contract.creatorName} created
+ this market
+
+
+
+
+ {/* TODO: Allow creator to update the description */}
+
+
+
+ >
+ )
+}
+
function toFeedBet(bet: Bet) {
return {
id: bet.id,
@@ -156,8 +183,13 @@ export function ContractFeed(props: { contract: Contract }) {
let bets = useBets(id)
if (bets === 'loading') bets = []
- // TODO: aggregate bets across each day window
- const allItems = bets.map(toActivityItem)
+ const allItems = [{ type: 'start', id: 0 }, ...bets.map(toActivityItem)]
+
+ // Missing feed items:
+ // - Aggegated bets (e.g. daily)
+ // - Bet sale
+ // - Market closed
+ // - Market resolved
return (
@@ -172,7 +204,9 @@ export function ContractFeed(props: { contract: Contract }) {
/>
) : null}
- {activityItem.type === 'comment' ? (
+ {activityItem.type === 'start' ? (
+
+ ) : activityItem.type === 'comment' ? (
) : activityItem.type === 'bet' ? (
diff --git a/web/components/contract-overview.tsx b/web/components/contract-overview.tsx
index 80cace20..29e620d9 100644
--- a/web/components/contract-overview.tsx
+++ b/web/components/contract-overview.tsx
@@ -145,14 +145,6 @@ export const ContractOverview = (props: {
- {((isCreator && !contract.resolution) || contract.description) && (
-
- )}
-
-
-
-
-
{/* Show a delete button for contracts without any trading */}