Skip to content

Commit c8cb200

Browse files
committed
fix: client side bug
1 parent 847fcf4 commit c8cb200

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/Card.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const Card = ({ country }) => {
3636
className="py-4 px-6 mb-3 flex justify-between items-start
3737
">
3838
<div className="">
39-
<h2 className="text-xl font-extrabold mb-2 w-11/12 lg:w-10/12 text-ellipsis overflow-hidden whitespace-nowrap">
39+
<h2 className="text-xl font-extrabold mb-2 w-11/12 lg:w-10/12 xl:w-11/12 text-ellipsis overflow-hidden whitespace-nowrap">
4040
{country.name.common.slice(0, 20)}
4141
</h2>
4242
<p className="text-base font-thin text-gray-900 dark:text-gray-300">
@@ -52,11 +52,13 @@ const Card = ({ country }) => {
5252
{country.region}
5353
</p>
5454

55-
<p className="text-base font-thin text-gray-900 dark:text-gray-300 w-9/12 text-ellipsis overflow-hidden whitespace-nowrap">
55+
<p className="text-base font-thin text-gray-900 dark:text-gray-300 w-10/12 text-ellipsis overflow-hidden whitespace-nowrap">
5656
<small className="font-semibold text-skin-text text-base">
5757
Capital:{" "}
5858
</small>
59-
{country.capital.join(", ")}
59+
{typeof country.capital === "object"
60+
? country.capital.join(", ")
61+
: country.capital}
6062
</p>
6163
</div>
6264
</div>

0 commit comments

Comments
 (0)