Skip to content

Commit 87b01c5

Browse files
committed
Updates
1 parent 194e012 commit 87b01c5

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

src/components/Tooltip/Tooltip.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import '../../scss/variables';
22

33
$icon-size-large: 18px;
4-
$icon-size-small: 16px;
4+
$icon-size-small: 14px;
55

66
$tooltip-spacing: 10px;
77

src/helpers/getBottlenoseDolphinCatalogue.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ describe('getCatalogueItem', () => {
133133
birthYear: null,
134134
age: null,
135135
sex: 'UNKNOWN',
136+
totalCalves: null,
136137
leftDorsalFin: null,
137138
rightDorsalFin: null,
138139
otherImages: [],
@@ -160,6 +161,7 @@ describe('getCatalogueItem', () => {
160161
birthYear: 'mocked birth year',
161162
age: 'mocked age',
162163
sex: 'mocked sex',
164+
totalCalves: 'mocked total calves',
163165
leftDorsalFin: 'mocked-left-dorsal-fin',
164166
rightDorsalFin: 'mocked-right-dorsal-fin',
165167
otherImages: ['mocked-other-image-1'],
@@ -204,6 +206,7 @@ describe('getCatalogueItem', () => {
204206
birthYear: 'mocked birth year',
205207
age: 'mocked age',
206208
sex: 'mocked sex',
209+
totalCalves: 'mocked total calves',
207210
leftDorsalFin: 'mocked-left-dorsal-fin',
208211
rightDorsalFin: 'mocked-right-dorsal-fin',
209212
otherImages: ['mocked-other-image-1'],

src/helpers/getBottlenoseDolphinCatalogue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const getCatalogueItem = async (
122122
birthYear: entry.fields?.birthYear ?? null,
123123
age: entry.fields.age ?? null,
124124
sex: entry.fields.sex ?? 'UNKNOWN',
125+
totalCalves: entry.fields.totalCalves ?? null,
125126
leftDorsalFin: entry.fields?.leftDorsalFin ? flattenImageAssetFields(entry.fields.leftDorsalFin) : null,
126127
rightDorsalFin: entry.fields?.rightDorsalFin ? flattenImageAssetFields(entry.fields.rightDorsalFin) : null,
127128
otherImages: entry.fields.otherImages?.map((item) => flattenImageAssetFields(item as Asset)) ?? [],

src/helpers/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export type CatalogueBottlenoseDolphin = {
9191
birthYear: string | null,
9292
age: number | null,
9393
sex: 'UNKNOWN' | 'FEMALE' | 'MALE',
94+
totalCalves: number | null,
9495
leftDorsalFin: FlattenedImage | null,
9596
rightDorsalFin: FlattenedImage | null,
9697
otherImages: Array<FlattenedImage> | [],
@@ -239,6 +240,7 @@ export type ContentTypeCatalogueBottlenoseDolphin = {
239240
age?: EntryFieldTypes.Integer,
240241
sex: EntryFieldTypes.Symbol<'UNKNOWN' | 'FEMALE' | 'MALE'>,
241242
mother?: EntryFieldTypes.EntryLink<ContentTypeCatalogueBottlenoseDolphin>,
243+
totalCalves?: EntryFieldTypes.Integer,
242244
leftDorsalFin?: EntryFieldTypes.AssetLink,
243245
rightDorsalFin?: EntryFieldTypes.AssetLink,
244246
otherImages?: EntryFieldTypes.Array<EntryFieldTypes.AssetLink>,

src/pages/research/catalogues/bottlenose-dolphin/[slug].tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ const Page: NextPage<PageProps> = ({
172172
birthYear,
173173
age,
174174
sex,
175+
totalCalves,
175176
leftDorsalFin,
176177
rightDorsalFin,
177178
otherImages,
@@ -250,7 +251,7 @@ const Page: NextPage<PageProps> = ({
250251
</li>
251252
<li className={[styles['info-item-wide'], styles['info-item-calves']].join(' ')}>
252253
<b>Total Number Of Calves</b>
253-
<Unknown />
254+
{totalCalves ? totalCalves : <Unknown />}
254255
<Tooltip text="Combined number of known calves across the CRRU and AULFS catalogues" />
255256
</li>
256257

0 commit comments

Comments
 (0)