From 9290e3eb6fa46c7b32d80f37a8b598ab09e64998 Mon Sep 17 00:00:00 2001 From: Igor Date: Sat, 17 Apr 2021 23:17:36 +0300 Subject: [PATCH] form controls (#417) --- app/calendar/components/EventModal.tsx | 74 +++++----- app/freeagents/components/FAModal.tsx | 42 +++--- components/u/BuildModal.tsx | 92 +++++++------ components/u/ProfileModal.tsx | 180 +++++++++++++------------ pages/maps.tsx | 89 ++++++------ pages/sr/leaderboards/new.tsx | 26 ++-- 6 files changed, 265 insertions(+), 238 deletions(-) diff --git a/app/calendar/components/EventModal.tsx b/app/calendar/components/EventModal.tsx index cf889ee53..3b033d39a 100644 --- a/app/calendar/components/EventModal.tsx +++ b/app/calendar/components/EventModal.tsx @@ -148,11 +148,10 @@ export function EventModal({ */} - - Name - - + + Name + {errors.name} - - Date - - + + Date + {errors.date?.message} - - Discord invite URL - - + + Discord invite URL + - - Registration URL - - + + Registration URL + {errors.eventUrl?.message} - - Format - + + + Format + - + + - - Tags - - ( - - )} - /> + + + Tags + + ( + + )} + /> + diff --git a/app/freeagents/components/FAModal.tsx b/app/freeagents/components/FAModal.tsx index 9bc839a00..96871bd8d 100644 --- a/app/freeagents/components/FAModal.tsx +++ b/app/freeagents/components/FAModal.tsx @@ -124,11 +124,11 @@ const FAModal = ({ onClose, post, refetchQuery }: Props) => { )} - - Roles - + + Roles + { - - Can you voice chat? - - ( - - - Yes - Sometimes - No - - - )} - /> + + + Can you voice chat? + + ( + + + Yes + Sometimes + No + + + )} + /> + = ({ onClose, build, weaponFromQuery }) => { - - Head - - ( - - )} - /> + + + Head + + ( + + )} + /> + - - Clothing - - ( - - )} - /> + + + Clothing + + ( + + )} + /> + - - Shoes - - ( - - )} - /> + + + Shoes + + ( + + )} + /> + diff --git a/components/u/ProfileModal.tsx b/components/u/ProfileModal.tsx index 2c8573b86..ff1846fb3 100644 --- a/components/u/ProfileModal.tsx +++ b/components/u/ProfileModal.tsx @@ -225,95 +225,103 @@ const ProfileModal: React.FC = ({ onClose, user }) => { {errors.youtubeId?.message} - - Country - - ( - - {(Object.keys(countries) as Array) - .sort((a, b) => - countries[a].name.localeCompare(countries[b].name) - ) - .map((countryCode) => ( - + )} + /> + - - Weapon pool - - ( - - )} - /> - - - - Stick sensitivity - - ( - - {sensOptions.map((sens) => ( - - ))} - - )} - /> - - - - Motion sensitivity - - ( - - {sensOptions.map((sens) => ( - - ))} - - )} - /> + + + + Motion sensitivity + + ( + + {sensOptions.map((sens) => ( + + ))} + + )} + /> + { ); })} - - Share your map pool - - {window && ( - - - - - - - )} + + + Share your map pool + + {window && ( + + + + + + + )} + ) : ( { width={"90%"} /> )} - - Amount of maps to generate - - { - if (!Number.isNaN(value)) setCount(value); - }} - mb={4} - width={24} - > - - - - - - + + + Amount of maps to generate + + { + if (!Number.isNaN(value)) setCount(value); + }} + mb={4} + width={24} + > + + + + + + + {maplist && ( <>