// Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import classNames from 'classnames'; import type { CSSProperties, ReactElement } from 'react'; import React, { useEffect, useState } from 'react'; import type { LocalizerType } from '../../types/Util'; import { TimelineDateHeader } from './TimelineDateHeader'; import { Spinner } from '../Spinner'; export const TimelineFloatingHeader = ({ i18n, isLoading, style, timestamp, visible, }: Readonly<{ i18n: LocalizerType; isLoading: boolean; style?: CSSProperties; timestamp: number; visible: boolean; }>): ReactElement => { const [hasRendered, setHasRendered] = useState(false); useEffect(() => { setHasRendered(true); }, []); return (