This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/components/Header/Language/LanguageFlag.tsx
Divlo a64325f5b8
fix: improve overall rendering v3 (#25)
Follow-up of #15

Co-authored-by: Walidoux <ma.walidkorchi@icloud.com>
2022-04-07 16:54:05 +02:00

25 lines
493 B
TypeScript

import Image from 'next/image'
export interface LanguageFlagProps {
language: string
}
export const LanguageFlag: React.FC<LanguageFlagProps> = (props) => {
const { language } = props
return (
<>
<Image
quality={100}
width={35}
height={35}
src={`/images/svg/languages/${language}.svg`}
alt={language}
/>
<p data-cy='language-flag-text' className='mx-2 text-base'>
{language.toUpperCase()}
</p>
</>
)
}