| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow |
| 8 | */ |
| 9 | |
| 10 | import * as React from 'react'; |
| 11 | import {useContext} from 'react'; |
| 12 | import {ProfilerContext} from './ProfilerContext'; |
| 13 | |
| 14 | import styles from './Profiler.css'; |
| 15 | |
| 16 | export default function RecordingInProgress(): React.Node { |
| 17 | const {stopProfiling} = useContext(ProfilerContext); |
| 18 | |
| 19 | return ( |
| 20 | <div className={styles.Column}> |
| 21 | <div className={styles.Header}>Profiling is in progress...</div> |
| 22 | <button |
| 23 | className={styles.CTAButton} |
| 24 | onClick={stopProfiling} |
| 25 | type="button"> |
| 26 | Stop recording |
| 27 | </button> |
| 28 | </div> |
| 29 | ); |
| 30 | } |