rsnext/examples/with-unsplash/components/UImage/index.tsx
Diego Gennaro 85d58298a3
Add example: Unsplash integration (#16142)
* nextjs with unsplash initial commit

* update demo link

* remove isomorphic-unfetch

* remove ssr on collection page

* fix style issues

* fix import/no-anonymous-default-export

* usign fetch instead of request

* remove credits

* improve instructions

* improve instructions

* Updated readme steps and images

* Updated readme

* Updated gitignore

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-22 16:02:49 -05:00

15 lines
415 B
TypeScript

import styles from './UImage.module.css'
import UIcon from 'components/UIcon'
const Uimage = ({ id, urls, altDescription }) => {
return (
<div key={`uimg_container_${id}`}>
<img className={styles.img} src={urls.small} alt={altDescription} />
<div className={styles.actions}>
<UIcon url={`/api/photo/download/${id}`} name="download" />
</div>
</div>
)
}
export default Uimage