Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

fix(advocates): display whole country name in advocate cards #3535

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
:name="advocate.name"
:image="advocate.image"
:city="advocate.city"
:country="advocate.country[0]"
:country="advocate.country"
:region="advocate.region"
:slack-id="advocate.slackId"
:slack-username="advocate.slackUsername"
Expand Down
2 changes: 1 addition & 1 deletion hooks/advocate-conversion-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class AdvocatesAirtableRecords extends AirtableRecords {
return record.get(this.recordFields!.city);
}

public getCountry(record: any): string[] {
public getCountry(record: any): string {
return record.get(this.recordFields!.country);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/hooks/utils/conversion-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("writeJSONToFile", () => {
image: "/images/advocates/downloaded/rec8zXNiryVq3Q6kh.jpg",
region: "America (North)",
city: "New York",
country: ["United States"],
country: "United States",
slackId: "U017XULSMUY",
slackUsername: "John.Doe",
},
Expand All @@ -31,7 +31,7 @@ describe("writeJSONToFile", () => {
image: "/images/advocates/downloaded/recFKAk7KoXr3IMTH.jpg",
region: "America (North)",
city: "Durham",
country: ["United States"],
country: "United States",
slackId: "U01313A0AGP",
slackUsername: "J.Doe",
},
Expand Down Expand Up @@ -62,7 +62,7 @@ describe("writeJSONToFile", () => {
image: "/images/advocates/downloaded/rec8zXNiryVq3Q6kh.jpg",
region: "America (North)",
city: "New York",
country: ["United States"],
country: "United States",
slackId: "U017XULSMUY",
slackUsername: "J.Doe",
},
Expand All @@ -71,7 +71,7 @@ describe("writeJSONToFile", () => {
image: "/images/advocates/downloaded/recFKAk7KoXr3IMTH.jpg",
region: "America (North)",
city: "Durham",
country: ["United States"],
country: "United States",
slackId: "U01313A0AGP",
slackUsername: "John.Doe",
},
Expand Down
2 changes: 1 addition & 1 deletion types/advocates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ADVOCATES_WORLD_REGION_OPTIONS = Object.values(

interface Advocate {
city: string;
country: string[];
country: string;
image: string;
location?: string;
name: string;
Expand Down
Loading