import { ChangeEvent, memo, useEffect, useState } from "react" import ShiftBy from "@components/shift-by" import styles from "../post.module.css" import Input from "@components/input" const titlePlaceholders = [ "How to...", "Status update for ...", "My new project", "My new idea", "Let's talk about...", "What's up with ...", "I'm thinking about ..." ] type props = { onChange: (e: ChangeEvent) => void title?: string } const Title = ({ onChange, title }: props) => { const [placeholder, setPlaceholder] = useState(titlePlaceholders[0]) useEffect(() => { // set random placeholder on load setPlaceholder( titlePlaceholders[Math.floor(Math.random() * titlePlaceholders.length)] ) }, []) return (

Drift

) } export default memo(Title)