Skip to content

Commit 1584c79

Browse files
committed
Show border after selecting a gender
1 parent a507064 commit 1584c79

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

app/components/random_chat_components/CategoriesAndGenderDetailsPopup.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const CategoriesAndGenderDetailsPopup = () => {
2424
const [alert, setAlert] = useState<boolean>(false);
2525

2626
// check for gender also (in future)
27-
const [gender, setGender] = useState<string>("both");
27+
const [gender, setGender] = useState<string>("");
2828

2929
const router = useRouter();
3030

@@ -107,10 +107,10 @@ const CategoriesAndGenderDetailsPopup = () => {
107107
return (
108108
<>
109109
{alert && (
110-
<Alert
111-
message="Oops! We couldn't find a user matching your search"
112-
setFunction={setAlert}
113-
/>
110+
<Alert
111+
message="Oops! We couldn't find a user matching your search"
112+
setFunction={setAlert}
113+
/>
114114
)}
115115
<div className="flex flex-col justify-between bg-[#222831] rounded p-4 w-[30%] h-[auto] m-auto">
116116
<MdOutlineCancel className="self-end text-2xl font-md text-gray-400 cursor-pointer hover:text-gray-50" />
@@ -125,7 +125,9 @@ const CategoriesAndGenderDetailsPopup = () => {
125125
height={30}
126126
width={40}
127127
alt="profile-picture"
128-
className="hover:border-[#EE99C2] hover:border-2 cursor-pointer"
128+
className={`hover:border-[#EE99C2] hover:border-2 cursor-pointer ${
129+
gender === "female" && "border-[#EE99C2] border-2"
130+
}`}
129131
onClick={() => setGender("female")}
130132
/>
131133
<h6 className="text-gray-200 text-sm mt-2">female</h6>
@@ -136,7 +138,9 @@ const CategoriesAndGenderDetailsPopup = () => {
136138
height={30}
137139
width={40}
138140
alt="profile-picture"
139-
className="hover:border-[#5755FE] hover:border-2 cursor-pointer"
141+
className={`hover:border-[#5755FE] hover:border-2 cursor-pointer ${
142+
gender === "male" && "border-[#5755FE] border-2"
143+
}`}
140144
onClick={() => setGender("male")}
141145
/>
142146
<h6 className="text-gray-200 text-sm mt-2">male</h6>
@@ -147,7 +151,9 @@ const CategoriesAndGenderDetailsPopup = () => {
147151
height={30}
148152
width={40}
149153
alt="profile-picture"
150-
className="hover:border-[#3AA6B9] hover:border-2 cursor-pointer"
154+
className={`hover:border-[#3AA6B9] hover:border-2 cursor-pointer ${
155+
gender === "both" && "border-[#3AA6B9] border-2"
156+
}`}
151157
onClick={() => setGender("both")}
152158
/>
153159
<h6 className="text-gray-200 text-sm mt-2">both</h6>

0 commit comments

Comments
 (0)