Skip to content

Commit

Permalink
Refactor CountrySelect component to remove unused imports and clean u…
Browse files Browse the repository at this point in the history
…p code
  • Loading branch information
GithmiHashara committed Sep 13, 2024
1 parent 0caab18 commit 7589a58
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/components/inputs/CountrySelect.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@


'use client'

import Select from 'react-select'
import useCountries from '@/app/hooks/useCountries'

import Image from 'next/image'

export type CountrySelectValue = {
flag: string
Expand Down Expand Up @@ -33,10 +31,12 @@ const CountrySelect: React.FC<CountrySelectProps> = ({ value, onChange }) => {
formatOptionLabel={(option: any) => (
<div className="flex flex-row items-center gap-3">
{option.flag && (
<img
<Image
src={option.flag}
alt={`${option.label} flag`}
style={{ width: '20px', height: '15px', borderRadius: '2px' }}
width={20}
height={15}
style={{ borderRadius: '2px' }}
/>
)}
<div>
Expand All @@ -57,8 +57,8 @@ const CountrySelect: React.FC<CountrySelectProps> = ({ value, onChange }) => {
borderRadius: 6,
colors: {
...theme.colors,
primary: '#fcd75f', //if want give black
primary25: '#fef3c7', // light yellow for hover ( rose colour is #ffe4e6)
primary: '#fcd75f', // if want give black
primary25: '#fef3c7', // light yellow for hover (rose colour is #ffe4e6)
},
})}
/>
Expand Down

0 comments on commit 7589a58

Please sign in to comment.