# image-optimization/1.7.4/modules/reviews/assets/src/components/review-form.js

Image Optimizer – Compress Images and Convert to WebP or AVIF, version 1.7.4. 40 lines.

- Page: https://pluginprobe.com/plugins/image-optimization/1.7.4/code/modules/reviews/assets/src/components/review-form.js
- Raw: https://pluginprobe.com/plugins/image-optimization/1.7.4/raw/modules/reviews/assets/src/components/review-form.js
- Modified: 2026-01-20T08:04:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/image-optimization/1.7.4/code/modules/reviews/assets/src/components/review-form.js#L10-L20`.

```javascript
import FormControl from '@elementor/ui/FormControl';
import Button from '@elementor/ui/Button';
import Typography from '@elementor/ui/Typography';
import { __ } from '@wordpress/i18n';
import useStorage from '../hooks/use-storage';
import { WORDPRESS_REVIEW_LINK } from '../constants';

const ReviewForm = ( { close } ) => {
	const { save, get } = useStorage();

	const handleSubmit = async () => {
		await save( {
			image_optimizer_review_data: {
				...get.data.image_optimizer_review_data,
				repo_review_clicked: true,
			},
		} );

		close();
		window.open( WORDPRESS_REVIEW_LINK, '_blank' );
	};

	return (
		<FormControl fullWidth>
			<Typography variant="body1" marginBottom={ 1 }>
				{ __( 'It would mean a lot if you left us a quick review, so others can discover it too.', 'image-optimization' ) }
			</Typography>
			<Button
				color="primary"
				variant="contained"
				onClick={ handleSubmit }
			>
				{ __( 'Leave a review', 'image-optimization' ) }
			</Button>
		</FormControl>
	);
};

export default ReviewForm;

```
