diff --git a/.eslintrc.js b/.eslintrc.js index 63633947e..a150efbff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -170,6 +170,12 @@ module.exports = { "import/consistent-type-specifier-style": "off" } }, + { + files: ["*.test.js", "*.test.tsx"], + rules: { + "react/jsx-props-no-spreading": "off" + } + }, { files: ["**/__mocks__/**/*", "**/*mock*", "**/*.mock.*"], rules: { diff --git a/src/api/types.d.ts b/src/api/types.d.ts index 286230f76..7408cc7bc 100644 --- a/src/api/types.d.ts +++ b/src/api/types.d.ts @@ -102,12 +102,17 @@ export interface ApiUser { export interface ApiComment { body?: string; user?: ApiUser; + id: number; + hidden?: boolean; + uuid: string; + created_at: string; } export interface ApiIdentification { body?: string; taxon?: ApiTaxon; user?: ApiUser; + hidden?: boolean; } export interface ApiNotification { @@ -134,6 +139,9 @@ export interface ApiObservation extends ApiRecord { time_observed_at?: string; user?: ApiUser; uuid: string; + comments?: ApiComment[]; + identifications?: ApiIdentification[]; + taxon?: ApiTaxon; } export interface ApiObservationsSearchResponse extends ApiResponse { diff --git a/src/components/Match/Match.js b/src/components/Match/Match.js index 5f26c9626..bf05944b7 100644 --- a/src/components/Match/Match.js +++ b/src/components/Match/Match.js @@ -19,9 +19,9 @@ import MatchHeader from "./MatchHeader"; import PhotosSection from "./PhotosSection"; import SaveDiscardButtons from "./SaveDiscardButtons"; -const cardClassTop +export const matchCardClassTop = "rounded-t-2xl border-lightGray border-[2px] py-[18px] px-5 border-b-0 -mb-0.5"; -const cardClassBottom +export const matchCardClassBottom = "rounded-b-2xl border-lightGray border-[2px] pb-3 border-t-0 -mt-0.5 mb-[30px]"; type Props = { @@ -66,7 +66,7 @@ const Match = ( { return ( <> - + { suggestionsLoading ? ( @@ -127,7 +127,7 @@ const Match = ( { return ( <> - + { suggestionsLoading ? ( @@ -177,7 +177,7 @@ const Match = ( { return ( <> - + { suggestionsLoading ? ( @@ -207,7 +207,7 @@ const Match = ( { belongsToCurrentUser observation={observation} /> - + { isConnected && (