github.com/grafana/pyroscope@v1.18.0/public/app/components/RefreshButton.tsx (about) 1 import React from 'react'; 2 import Button from '@pyroscope/ui/Button'; 3 4 import { faSyncAlt } from '@fortawesome/free-solid-svg-icons/faSyncAlt'; 5 import { useAppDispatch } from '@pyroscope/redux/hooks'; 6 import { actions } from '@pyroscope/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;