/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type {SchedulingEvent} from 'react-devtools-timeline/src/types'; import * as React from 'react'; import Button from '../Button'; import ButtonIcon from '../ButtonIcon'; import {useContext} from 'react'; import {TimelineContext} from 'react-devtools-timeline/src/TimelineContext'; import { formatTimestamp, getSchedulingEventLabel, } from 'react-devtools-timeline/src/utils/formatting'; import {stackToComponentLocations} from 'react-devtools-shared/src/devtools/utils'; import {copy} from 'clipboard-js'; import {withPermissionsCheck} from 'react-devtools-shared/src/frontend/utils/withPermissionsCheck'; import useOpenResource from '../useOpenResource'; import styles from './SidebarEventInfo.css'; export type Props = {}; type SchedulingEventProps = { eventInfo: SchedulingEvent, }; function SchedulingEventInfo({eventInfo}: SchedulingEventProps) { const {componentName, timestamp} = eventInfo; const componentStack = eventInfo.componentStack || null; return ( <>