import React from 'react'; import { observer } from 'mobx-react-lite'; import { TextEllipsis, Input } from 'UI'; import { PlayerContext } from 'App/components/Session/playerContext'; import useInputState from 'App/hooks/useInputState' import TimeTable from '../TimeTable'; import BottomBlock from '../BottomBlock'; import { useModal } from 'App/components/Modal'; import ProfilerModal from '../ProfilerModal'; import { useRegExListFilterMemo } from '../useListFilter' const renderDuration = (p: any) => `${p.duration}ms`; const renderName = (p: any) => ; function ProfilerPanel() { const { store } = React.useContext(PlayerContext) const profiles = store.get().profilesList as any[] // TODO lest internal types const { showModal } = useModal(); const [ filter, onFilterChange ] = useInputState() const filtered = useRegExListFilterMemo(profiles, pr => pr.name, filter) const onRowClick = (profile: any) => { showModal(, { right: true }); }; return (
Profiler
{[ { label: 'Name', dataKey: 'name', width: 200, render: renderName, }, { label: 'Time', key: 'duration', width: 80, render: renderDuration, }, ]}
); } export default observer(ProfilerPanel);