Skip to content

Commit

Permalink
Update index.tsx (#86)
Browse files Browse the repository at this point in the history
* Update index.tsx

Sort cities names
closes #44

* make domains optional
  • Loading branch information
idormenco authored Nov 21, 2023
1 parent 72ec011 commit efeefcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/pages/public/Register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const registerSchema = object({
.max(32, "Password must be less than 32 characters"),
confirmPassword: string(),
avatar: custom<File[]>(),
domains: array(number()),
domains: array(number()).optional(),
website: string(),
keywords: string(),
description: string(),
Expand Down Expand Up @@ -119,15 +119,15 @@ const Register = () => {
}
};

const counties = Object.keys(citiesByCounty).map((county: string) => ({
const counties = Object.keys(citiesByCounty).sort().map((county: string) => ({
label: county,
name: county,
}));

const cities = useMemo(
() =>
county
? [...new Set(citiesByCounty[county].map((city) => city.nume))].map(
? [...new Set(citiesByCounty[county].map((city) => city.nume))].sort().map(
(city) => ({
name: city,
label: city,
Expand Down

1 comment on commit efeefcf

@vercel
Copy link

@vercel vercel bot commented on efeefcf Nov 21, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

crestem-ong – ./

crestem-ong-git-main-code4romania.vercel.app
app.crestem.ong
crestem-ong-code4romania.vercel.app

Please sign in to comment.