Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update broken links to some flags #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

a-kriya
Copy link

@a-kriya a-kriya commented Jan 7, 2024

- Bolivia
- Ireland
- Vatican
- DRC
- Kyrgyzstan
- Réunion
- Sao Tome and Principe
@a-kriya
Copy link
Author

a-kriya commented Feb 22, 2024

I've been using a map with a helper to workaround the issue:

const fixedUrls = {
  BO: '/d/de/Flag_of_Bolivia_%28state%29.svg',
  CD: '/6/6f/Flag_of_the_Democratic_Republic_of_the_Congo.svg',
  IE: '/4/45/Flag_of_Ireland.svg',
  KG: '/3/31/Flag_of_Kyrgyzstan_%282023%29.svg',
  PS: '/0/00/Flag_of_Palestine.svg',
  RE: '/8/8e/Proposed_flag_of_Réunion_%28VAR%29.svg',
  ST: '/0/0a/Flag_of_São_Tomé_and_Príncipe.svg',
  VA: '/3/39/Flag_of_the_Vatican_City_%282023%E2%80%93present%29.svg',
}

function getFlagUrl(code) {
  if (Object.hasOwn(fixedUrls, code))
    return 'https://upload.wikimedia.org/wikipedia/commons' + fixedUrls[code]
  return findFlagUrlByIso2Code(code)  // from this package
}

@AnisTigrini
Copy link

Hi @a-kriya and @neriagini the developer seems to be away for some reason hope he is alright.
I actually took the liberty to clone hist project and fix the issues that he had with typescript and the broken flag links.
You can find the npm package right here https://www.npmjs.com/package/country-flags-svg-v2
hope this helps :)

@samdemaeyer
Copy link

Hi @ronatskiy .. will this PR be merged any time soon? Seems like a straightforward fix and it's been open for a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ireland Flag is missing for findFlagUrlByCountryName Update Palestine flag Vatican flag issue
4 participants