import PropTypes from 'prop-types' import {Box} from '@mui/material' import AwtisDetay from '../../components/awtis/awtis-detay' import Footer from '../../components/footer' import HeadLayout from '../../components/head-layout' import {jwennAwtisEpiSlug} from '../../lib/oki-api' import Custom404 from '../404' export default function SlugAwtis({error, anAwtis}) { if (error) { return } const {foto} = anAwtis const formatKouveti = () => { if (foto.length === 0) { return null } const [anFoto] = foto if (anFoto && anFoto.formats && anFoto.formats.large) { return anFoto.formats.large } if (anFoto && anFoto.formats && anFoto.formats.medium) { return anFoto.formats.medium } if (anFoto && anFoto.formats && anFoto.formats.small) { return anFoto.formats.small } return anFoto } return (