From e697024f528933692a9122e34422e1631b594b2d Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 27 Jan 2022 14:40:46 -0600 Subject: [PATCH] FeedCreate: change placeholders, cycle through randomly --- web/components/feed-create.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/web/components/feed-create.tsx b/web/components/feed-create.tsx index f2fe3806..2565b543 100644 --- a/web/components/feed-create.tsx +++ b/web/components/feed-create.tsx @@ -65,19 +65,17 @@ export default function FeedCreate(props: { const [question, setQuestion] = useState('') const placeholders = [ - 'Will I make a new friend this week?', - 'Will we discover that the world is a simulation?', 'Will anyone I know get engaged this year?', 'Will humans set foot on Mars by the end of 2030?', - 'If I switch jobs, will I have more free time in 6 months than I do now?', - 'Will any cryptocurrency eclipse Bitcoin by market cap?', + 'Will any cryptocurrency eclipse Bitcoin by market cap this year?', + 'Will the Democrats win the 2024 presidential election?', ] // Rotate through a new placeholder each day // Easter egg idea: click your own name to shuffle the placeholder - const daysSinceEpoch = Math.floor(Date.now() / 1000 / 60 / 60 / 24) - const placeholder = - props.placeholder ?? - `e.g. ${placeholders[daysSinceEpoch % placeholders.length]}` + // const daysSinceEpoch = Math.floor(Date.now() / 1000 / 60 / 60 / 24) + + const randIndex = Math.floor(Math.random() * 1e10) % placeholders.length + const placeholder = props.placeholder ?? `e.g. ${placeholders[randIndex]}` return (