diff --git a/frontend-react/public/locales/en/translation.json b/frontend-react/public/locales/en/translation.json index 7850488dd..4fa64514d 100644 --- a/frontend-react/public/locales/en/translation.json +++ b/frontend-react/public/locales/en/translation.json @@ -1411,5 +1411,62 @@ "Number of placements": "Number of placements", "Best placement / power": "Best placement / power", "noPlacementsPrompt": "If you have reached Top 500 in a <1>finished X Rank season you can have it displayed here! Make sure your Twitter account is verified on Discord to get it showing on your sendou.ink profile and then contact Sendou#0043 on Discord with your in-game nick. Once set up new results are added automatically and no further action is needed unless you change your name on Twitter." + }, + "freeagents": { + "loginPrompt": "Log in to make your own free agent post and start matching!", + "pleaseWaitPrompt": "You need to wait a week after deleting your old free agent post before making a new one", + "Hide filters": "Hide filters", + "Show filters": "Show filters", + "Playstyle": "Playstyle", + "Region": "Region", + "Any": "Any", + "Frontline/Slayer": "Frontline/Slayer", + "Midline/Support": "Midline/Support", + "Backline/Anchor": "Backline/Anchor", + "Europe": "Europe", + "The Americas": "The Americas", + "Oceania": "Oceania", + "Other": "Other", + "Weapon": "Weapon", + "Edit free agent post": "Edit free agent post", + "New free agent post": "New free agent post", + "MATCHES": "MATCHES", + "youHaveAMatch": "You have a match with <1>{{matchFullName}}! Contact them to see if you can get a team going", + "getLiking": "This match is revealed when you like them back!", + "getLiking_plural": "These matches are revealed when you like them back!", + "No free agents found with the current filter": "No free agents found with the current filter", + "No more free agents to show": "No more free agents to show", + "Return to the top": "Return to the top", + "Can VC": "Can VC", + "Can VC usually": "Can VC usually", + "Can VC sometimes": "Can VC sometimes", + "Can't VC": "Can't VC", + "Show more information": "Show more information", + "Activity": "Activity", + "Looking for": "Looking for", + "Past experience": "Past experience", + "Description": "Description", + "Free agent post added": "Free agent post added", + "Free agent post edited": "Free agent post edited", + "Free agent post deleted": "Free agent post deleted", + "Adding a new free agent post": "Adding a new free agent post", + "Editing a free agent post": "Editing a free agent post", + "Delete free agent post": "Delete free agent post", + "deleteNotif": "Note that if you decide to delete your post you need to wait a week before posting a new one.", + "Confirm deletion": "Confirm deletion", + "theyAreSynced": "Profile picture, Discord name, Twitter user, weapon pool and Top 500 history are automatically synced up with your profile. Also please note that the post automatically sent to Discord can't be edited afterwards so you want to set these before making a post.", + "Playstyles": "Playstyles", + "Required field": "Required field", + "Value too long": "Value too long", + "Free agent has reached Top 500 in X Rank": "Free agent has reached Top 500 in X Rank", + "Can you voice chat?": "Can you voice chat?", + "Yes": "Yes", + "Usually": "Usually", + "Sometimes": "Sometimes", + "No": "No", + "Past competitive experience": "Past competitive experience", + "What is your activity like on a typical week?": "What is your activity like on a typical week?", + "What are you looking from a team?": "What are you looking from a team?", + "Free word": "Free word" } } diff --git a/frontend-react/src/assets/questionMark.jpg b/frontend-react/src/assets/questionMark.jpg new file mode 100644 index 000000000..816e8be72 Binary files /dev/null and b/frontend-react/src/assets/questionMark.jpg differ diff --git a/frontend-react/src/components/elements/RadioGroup.tsx b/frontend-react/src/components/elements/RadioGroup.tsx index bfe8d0bc1..0966dc9c1 100644 --- a/frontend-react/src/components/elements/RadioGroup.tsx +++ b/frontend-react/src/components/elements/RadioGroup.tsx @@ -3,7 +3,7 @@ import { RadioGroup as ChakraRadioGroup, Radio, Box } from "@chakra-ui/core" import MyThemeContext from "../../themeContext" interface RadioGroupProps { - options: string[] + options: { label: string; value: string }[] value: string label?: string setValue: (value: any) => void @@ -29,14 +29,14 @@ const RadioGroup: React.FC = ({ onChange={(e) => setValue(e.target.value)} value={value} > - {options.map((option) => ( + {options.map(({ label, value }) => ( - {option} + {label} ))} diff --git a/frontend-react/src/components/elements/Select.tsx b/frontend-react/src/components/elements/Select.tsx index ed1a1247e..e1b2913e3 100644 --- a/frontend-react/src/components/elements/Select.tsx +++ b/frontend-react/src/components/elements/Select.tsx @@ -115,7 +115,7 @@ const Select: React.FC = ({ } return ( - + {label && } = ({ color: getOptionColor(isFocused), } }, + menu: (styles) => ({ ...styles, zIndex: 999 }), }} /> diff --git a/frontend-react/src/components/freeagents/FAPostModal.tsx b/frontend-react/src/components/freeagents/FAPostModal.tsx index 1f0ba6e76..6219c990b 100644 --- a/frontend-react/src/components/freeagents/FAPostModal.tsx +++ b/frontend-react/src/components/freeagents/FAPostModal.tsx @@ -26,6 +26,7 @@ import { UPDATE_FREE_AGENT_POST } from "../../graphql/mutations/updateFreeAgentP import { HIDE_FREE_AGENT_POST } from "../../graphql/mutations/hideFreeAgentPost" import Alert from "../elements/Alert" import { FREE_AGENT_MATCHES } from "../../graphql/queries/freeAgentMatches" +import { useTranslation } from "react-i18next" interface FAPostModalProps { closeModal: () => void @@ -33,6 +34,7 @@ interface FAPostModalProps { } const FAPostModal: React.FC = ({ closeModal, post }) => { + const { t } = useTranslation() const [form, setForm] = useState>( post ? post : {} ) @@ -49,7 +51,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { onCompleted: (data) => { closeModal() toast({ - description: `Free agent post added`, + description: t("freeagents;Free agent post added"), position: "top-right", status: "success", duration: 10000, @@ -57,7 +59,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { }, onError: (error) => { toast({ - title: "An error occurred", + title: t("users;An error occurred"), description: error.message, position: "top-right", status: "error", @@ -75,7 +77,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { onCompleted: (data) => { closeModal() toast({ - description: `Free agent post edited`, + description: t("freeagents;Free agent post edited"), position: "top-right", status: "success", duration: 10000, @@ -83,7 +85,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { }, onError: (error) => { toast({ - title: "An error occurred", + title: t("users;An error occurred"), description: error.message, position: "top-right", status: "error", @@ -101,7 +103,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { onCompleted: (data) => { closeModal() toast({ - description: `Free agent post deleted`, + description: t("freeagents;Free agent post deleted"), position: "top-right", status: "success", duration: 10000, @@ -109,7 +111,7 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { }, onError: (error) => { toast({ - title: "An error occurred", + title: t("users;An error occurred"), description: error.message, position: "top-right", status: "error", @@ -149,8 +151,8 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { @@ -162,41 +164,33 @@ const FAPostModal: React.FC = ({ closeModal, post }) => { cursor="pointer" onClick={() => setDeleting(true)} > - Delete free agent post + {t("freeagents;Delete free agent post")} )} {deleting && ( <> - - Note that if you decide to delete your post you need to wait a week - before posting a new one. - + {t("freeagents;deleteNotif")} )} {actionType === "NEW" && ( - - Profile picture, Discord name, Twitter user, weapon pool and Top 500 - history are automatically synced up with your profile. Also please - note that the post automatically sent to Discord can't be edited - afterwards so you want to set these before making a post. - + {t("freeagents;theyAreSynced")} )} - Playstyles + {t("freeagents;Playstyles")} = ({ closeModal, post }) => { }) } > - Frontline/Slayer - Midline/Support - Backline/Anchor + + {t("freeagents;Frontline/Slayer")} + + {t("freeagents;Midline/Support")} + + {t("freeagents;Backline/Anchor")} + - Required field + {t("freeagents;Required field")} - Can you voice chat? + + {t("freeagents;Can you voice chat?")} + = ({ closeModal, post }) => { }) } > - Yes - Usually - Sometimes - No + {t("freeagents;Yes")} + {t("freeagents;Usually")} + {t("freeagents;Sometimes")} + {t("freeagents;No")} - Required field + {t("freeagents;Required field")} = ({ closeModal, post }) => { mt="1em" > - Past competitive experience + {t("freeagents;Past competitive experience")}