Skip to content

Commit

Permalink
Another changes in api
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Bartosik committed Sep 28, 2021
1 parent 8a2af73 commit 67dd363
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/CountryCard/CountryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const CountryCard: React.FC<Country> = ({
population,
region,
capital,
flags,
flag,
alpha3Code,
}) => {
return (
<Container as="li" data-testid="country">
<Link to={`/${alpha3Code}`} style={{ textDecoration: 'none' }}>
<FlagWrapper>
<img src={flags[0]} alt="" aria-hidden="true" />
<img src={flag} alt="" aria-hidden="true" />
</FlagWrapper>
<CountryInfo>
<h2>{name}</h2>
Expand Down
1 change: 1 addition & 0 deletions src/models/Country.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type Country = {
name: string;
nativeName: string;
flags: string[];
flag: string;
population: number;
region: string;
continent: string;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/CountryDetails/CountryDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const CountryDetails: React.FC = () => {
</Button>
<CountryWrapper as="article">
<Flag>
<img src={country?.flags[0]} alt={`flag of ${country?.name}`} />
<img src={country?.flag} alt={`flag of ${country?.name}`} />
</Flag>
<StyledCountryDetails>
<h1>{country?.name}</h1>
Expand Down

1 comment on commit 67dd363

@vercel
Copy link

@vercel vercel bot commented on 67dd363 Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.