Interface PlaceholderDateTimeCountdownProps

interface PlaceholderDateTimeCountdownProps {
    onZero: "placeholder";
    placeholder: string;
    prefix?: string;
    targetTimestamp: number;
    trimLeadingZeros?: boolean;
}

Hierarchy (View Summary)

Properties

onZero: "placeholder"
placeholder: string
prefix?: string

What to prefix the countdown with when it is not zero.

targetTimestamp: number

Server-sent Timestamp that was fetched from the backend. Unix time in seconds.

We use a number instead of Date because Dates are objects and would cause unnecessary re-renders. numbers are easier to memoize and to compare.

trimLeadingZeros?: boolean