Reorganized things again into packages

This commit is contained in:
Brian Vaughn
2019-08-13 11:37:25 -07:00
parent 7cabb3946e
commit ec7ef50e8b
298 changed files with 0 additions and 0 deletions
@@ -0,0 +1,25 @@
// @flow
import React, { useCallback, useContext } from 'react';
import { ProfilerContext } from './ProfilerContext';
import Button from '../Button';
import ButtonIcon from '../ButtonIcon';
import { StoreContext } from '../context';
export default function ClearProfilingDataButton() {
const store = useContext(StoreContext);
const { didRecordCommits, isProfiling } = useContext(ProfilerContext);
const { profilerStore } = store;
const clear = useCallback(() => profilerStore.clear(), [profilerStore]);
return (
<Button
disabled={isProfiling || !didRecordCommits}
onClick={clear}
title="Clear profiling data"
>
<ButtonIcon type="clear" />
</Button>
);
}