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;
};

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>
  );
}