anyone-oslo/pages

View on GitHub
app/javascript/components/PageImages.tsx

Summary

Maintainability
A
3 hrs
Test Coverage
import * as Images from "../types/Images";
import { Locale } from "../types";

import ImageGrid from "./ImageGrid";

type Props = {
  locale: string;
  locales: { [index: string]: Locale };
  records: Images.Record[];
}

export default function PageImages(props: Props) {
  return (
    <div className="page-images">
      <ImageGrid
        attribute="page[page_images_attributes]"
        primaryAttribute="page[image_id]"
        enablePrimary={true}
        showEmbed={true}
        locale={props.locale}
        locales={props.locales}
        records={props.records}
      />
    </div>
  );
}