This commit is contained in:
Brian Vaughn
2019-08-13 17:58:03 -07:00
parent edc46d7be7
commit 183f96f2ac
173 changed files with 3243 additions and 3123 deletions
@@ -1,15 +1,15 @@
// @flow
import React, { useCallback, useContext } from 'react';
import { ProfilerContext } from './ProfilerContext';
import React, {useCallback, useContext} from 'react';
import {ProfilerContext} from './ProfilerContext';
import Button from '../Button';
import ButtonIcon from '../ButtonIcon';
import { StoreContext } from '../context';
import {StoreContext} from '../context';
export default function ClearProfilingDataButton() {
const store = useContext(StoreContext);
const { didRecordCommits, isProfiling } = useContext(ProfilerContext);
const { profilerStore } = store;
const {didRecordCommits, isProfiling} = useContext(ProfilerContext);
const {profilerStore} = store;
const clear = useCallback(() => profilerStore.clear(), [profilerStore]);
@@ -17,8 +17,7 @@ export default function ClearProfilingDataButton() {
<Button
disabled={isProfiling || !didRecordCommits}
onClick={clear}
title="Clear profiling data"
>
title="Clear profiling data">
<ButtonIcon type="clear" />
</Button>
);