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

Website: Rounded flags #982

Closed
wants to merge 2 commits into from
Closed
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 @@ -7,7 +7,7 @@ import { Children, PropsWithChildren, useState } from 'react';
* We use the files from GitHub instead of the package so that donations from new countries are automatically supported.
*/
const getFlagImageURL = (country: string) => {
return `https://raw.githubusercontent.com/lipis/flag-icons/a87d8b256743c9b0df05f20de2c76a7975119045/flags/4x3/${country.toLowerCase()}.svg`;
return `https://raw.githubusercontent.com/lipis/flag-icons/a87d8b256743c9b0df05f20de2c76a7975119045/flags/1x1/${country.toLowerCase()}.svg`;
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Update flag-icons commit hash to latest version e119b66129af

The current commit hash (a87d8b2) is outdated. The latest commit hash (e119b66) includes potential improvements and fixes to the flag icons.

  • Update line 10 to use the latest commit:
return `https://raw.githubusercontent.com/lipis/flag-icons/e119b66129af/flags/1x1/${country.toLowerCase()}.svg`;
🔗 Analysis chain

Consider implications of pinned commit hash

While using a specific commit hash (a87d8b256743) ensures stability, it prevents automatic updates for flag improvements or fixes.

Let's check if this is the latest commit:

Consider implementing a version update strategy or documenting when/how to update this hash.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest commit of flag-icons repository
gh api repos/lipis/flag-icons/commits/main --jq '.sha[0:12]'

Length of output: 75

};

type CountryCardProps = {
Expand All @@ -24,7 +24,7 @@ export function CountryCard({ country, translations }: CountryCardProps) {
<li>
<Card>
<CardContent className="flex min-w-0 gap-x-4 py-8">
<img className="h-12 w-12 flex-none" src={getFlagImageURL(country)} alt="" />
<img className="size-12 flex-none rounded-full" src={getFlagImageURL(country)} alt="" />
<div className="min-w-0 flex-auto">
<Typography weight="medium" size="lg">
{translations.country}
Expand Down
Loading