github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/webapp/javascript/components/RefreshButton.tsx (about) 1 import React from 'react'; 2 import Button from '@webapp/ui/Button'; 3 4 import { faSyncAlt } from '@fortawesome/free-solid-svg-icons/faSyncAlt'; 5 import { useAppDispatch } from '@webapp/redux/hooks'; 6 import { actions } from '@webapp/redux/reducers/continuous'; 7 8 function RefreshButton() { 9 const dispatch = useAppDispatch(); 10 return ( 11 <Button 12 data-testid="refresh-btn" 13 icon={faSyncAlt} 14 onClick={() => dispatch(actions.refresh())} 15 /> 16 ); 17 } 18 19 export default RefreshButton;