|
@@ -9,20 +9,26 @@ import {t} from 'app/locale';
|
|
|
|
|
|
type Props = {
|
|
|
frame: Frame;
|
|
|
- onShowAllImages: () => void;
|
|
|
+ onShowAllImages: (filter: string) => void;
|
|
|
};
|
|
|
|
|
|
-const ImageForBar = ({frame, onShowAllImages}: Props) => (
|
|
|
- <Wrapper>
|
|
|
- <MatchedFunctionWrapper>
|
|
|
- <MatchedFunctionCaption>{t('Image for: ')}</MatchedFunctionCaption>
|
|
|
- <FrameFunctionName frame={frame} />
|
|
|
- </MatchedFunctionWrapper>
|
|
|
- <ResetAddressFilterCaption onClick={onShowAllImages}>
|
|
|
- {t('Show all images')}
|
|
|
- </ResetAddressFilterCaption>
|
|
|
- </Wrapper>
|
|
|
-);
|
|
|
+const ImageForBar = ({frame, onShowAllImages}: Props) => {
|
|
|
+ const handleShowAllImages = () => {
|
|
|
+ onShowAllImages('');
|
|
|
+ };
|
|
|
+
|
|
|
+ return (
|
|
|
+ <Wrapper>
|
|
|
+ <MatchedFunctionWrapper>
|
|
|
+ <MatchedFunctionCaption>{t('Image for: ')}</MatchedFunctionCaption>
|
|
|
+ <FrameFunctionName frame={frame} />
|
|
|
+ </MatchedFunctionWrapper>
|
|
|
+ <ResetAddressFilterCaption onClick={handleShowAllImages}>
|
|
|
+ {t('Show all images')}
|
|
|
+ </ResetAddressFilterCaption>
|
|
|
+ </Wrapper>
|
|
|
+ );
|
|
|
+};
|
|
|
|
|
|
ImageForBar.propTypes = {
|
|
|
frame: PropTypes.object.isRequired,
|