anyone-oslo/pages

View on GitHub
app/javascript/components/PageForm/Images.tsx

Summary

Maintainability
A
3 hrs
Test Coverage
import { GridState } from "../../types/Images";
import { Locale } from "../../types";
 
import Grid from "../ImageGrid/Grid";
 
type Props = {
locale: string;
locales: { [index: string]: Locale };
state: GridState;
};
 
Similar blocks of code found in 2 locations. Consider refactoring.
export default function Images(props: Props) {
return (
<div className="page-images">
<Grid
attribute="page[page_images_attributes]"
primaryAttribute="page[image_id]"
enablePrimary={true}
showEmbed={true}
locale={props.locale}
locales={props.locales}
state={props.state}
/>
</div>
);
}