import { faSyncAlt as reloadIcon } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, Card, CloseButton,useToggle } from '@shlinkio/shlink-frontend-kit'; import { clsx } from 'clsx'; import type { FC } from 'react'; import { useCallback } from 'react'; interface AppUpdateBannerProps { isOpen: boolean; onClose: () => void; forceUpdate: () => void; } export const AppUpdateBanner: FC = ({ isOpen, onClose, forceUpdate }) => { const { flag: isUpdating, setToTrue: setUpdating } = useToggle(); const update = useCallback(() => { setUpdating(); forceUpdate(); }, [forceUpdate, setUpdating]); if (!isOpen) { return null; } return (
This app has just been updated!
Restart it to enjoy the new features.
); };