import React from 'react'; import useFlash from '@/plugins/useFlash'; import { Actions } from 'easy-peasy'; import { ApplicationStore } from '@/state'; export interface WithFlashProps { flash: Actions['flashes']; } function withFlash (Component: React.ComponentType): React.ComponentType { return (props: TOwnProps) => { const { addError, addFlash, clearFlashes, clearAndAddHttpError } = useFlash(); return ( ); }; } export default withFlash;