1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-15 09:35:21 +01:00

exif test fixes

This commit is contained in:
Matthias Kretschmann 2019-11-04 19:38:02 +01:00
parent 22561c7f3b
commit 758c583ca6
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 14 additions and 12 deletions

View File

@ -30,9 +30,9 @@ export interface ExifFormatted {
} }
export interface Exif { export interface Exif {
formatted: ExifFormatted formatted?: ExifFormatted
exif: any exif?: any
image: any image?: any
thumbnail?: any thumbnail?: any
gps?: any gps?: any
iptc?: any iptc?: any

View File

@ -4,14 +4,16 @@ import { render } from '@testing-library/react'
import Exif from './Exif' import Exif from './Exif'
const exif = { const exif = {
iso: '500', formatted: {
model: 'Canon', iso: '500',
fstop: '7.2', model: 'Canon',
shutterspeed: '200', fstop: '7.2',
focalLength: '200', shutterspeed: '200',
lensModel: 'Hello', focalLength: '200',
exposure: '200', lensModel: 'Hello',
gps: { latitude: '41.89007222222222', longitude: '12.491516666666666' } exposure: '200',
gps: { latitude: '41.89007222222222', longitude: '12.491516666666666' }
}
} }
describe('Exif', () => { describe('Exif', () => {

View File

@ -24,7 +24,7 @@ export default function Exif({ exif }: { exif: ExifMeta }) {
{exposure && <span title="Exposure">{exposure}</span>} {exposure && <span title="Exposure">{exposure}</span>}
{iso && <span title="ISO">{iso}</span>} {iso && <span title="ISO">{iso}</span>}
</div> </div>
{gps.latitude && ( {gps && gps.latitude && (
<div className={styles.map}> <div className={styles.map}>
<ExifMap gps={gps} /> <ExifMap gps={gps} />
</div> </div>