mirror of
https://github.com/kremalicious/blog.git
synced 2024-12-22 09:13:35 +01:00
exif test fixes
This commit is contained in:
parent
22561c7f3b
commit
758c583ca6
6
src/@types/Image.d.ts
vendored
6
src/@types/Image.d.ts
vendored
@ -30,9 +30,9 @@ export interface ExifFormatted {
|
||||
}
|
||||
|
||||
export interface Exif {
|
||||
formatted: ExifFormatted
|
||||
exif: any
|
||||
image: any
|
||||
formatted?: ExifFormatted
|
||||
exif?: any
|
||||
image?: any
|
||||
thumbnail?: any
|
||||
gps?: any
|
||||
iptc?: any
|
||||
|
@ -4,14 +4,16 @@ import { render } from '@testing-library/react'
|
||||
import Exif from './Exif'
|
||||
|
||||
const exif = {
|
||||
iso: '500',
|
||||
model: 'Canon',
|
||||
fstop: '7.2',
|
||||
shutterspeed: '200',
|
||||
focalLength: '200',
|
||||
lensModel: 'Hello',
|
||||
exposure: '200',
|
||||
gps: { latitude: '41.89007222222222', longitude: '12.491516666666666' }
|
||||
formatted: {
|
||||
iso: '500',
|
||||
model: 'Canon',
|
||||
fstop: '7.2',
|
||||
shutterspeed: '200',
|
||||
focalLength: '200',
|
||||
lensModel: 'Hello',
|
||||
exposure: '200',
|
||||
gps: { latitude: '41.89007222222222', longitude: '12.491516666666666' }
|
||||
}
|
||||
}
|
||||
|
||||
describe('Exif', () => {
|
||||
|
@ -24,7 +24,7 @@ export default function Exif({ exif }: { exif: ExifMeta }) {
|
||||
{exposure && <span title="Exposure">{exposure}</span>}
|
||||
{iso && <span title="ISO">{iso}</span>}
|
||||
</div>
|
||||
{gps.latitude && (
|
||||
{gps && gps.latitude && (
|
||||
<div className={styles.map}>
|
||||
<ExifMap gps={gps} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user