diff --git a/components/AccountModal/index.tsx b/components/AccountModal/index.tsx index 13c18f17..ab8438c4 100644 --- a/components/AccountModal/index.tsx +++ b/components/AccountModal/index.tsx @@ -24,18 +24,6 @@ const AccountModal = () => { const locale = router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en' - // Cookies - const cookie = getCookie('account') - - const headers = {} - // cookies.account != null - // ? { - // headers: { - // Authorization: `Bearer ${cookies.account.access_token}`, - // }, - // } - // : {} - // State const [open, setOpen] = useState(false) const [picture, setPicture] = useState('') @@ -171,12 +159,16 @@ const AccountModal = () => { pictureData.find((i) => i.filename === picture)?.element }`} > - Profile preview + src={`/profile/${picture}.png`} + /> + ) : ( + '' + )} @@ -105,13 +100,13 @@ const FilterBar = (props: Props) => { defaultRaid="all" showAllRaidsOption={true} onChange={raidSelectChanged} - ref={raidSelect} /> - {label} - {error && error.length > 0 &&

{error}

} + {props.label} + {props.error && props.error.length > 0 && ( +

{props.error}

+ )} ) }) -Input.defaultProps = defaultProps - export default Input diff --git a/components/JobDropdown/index.tsx b/components/JobDropdown/index.tsx index 9e985397..7763bc3b 100644 --- a/components/JobDropdown/index.tsx +++ b/components/JobDropdown/index.tsx @@ -102,17 +102,20 @@ const JobDropdown = React.forwardRef( return ( ) diff --git a/components/JobSection/index.tsx b/components/JobSection/index.tsx index 10f04f27..50b390a7 100644 --- a/components/JobSection/index.tsx +++ b/components/JobSection/index.tsx @@ -18,7 +18,7 @@ interface Props { job?: Job jobSkills: JobSkillObject editable: boolean - saveJob: (job: Job) => void + saveJob: (job?: Job) => void saveSkill: (skill: JobSkill, position: number) => void } @@ -41,17 +41,15 @@ const JobSection = (props: Props) => { useEffect(() => { // Set current job based on ID - if (props.job) { - setJob(props.job) - setSkills({ - 0: props.jobSkills[0], - 1: props.jobSkills[1], - 2: props.jobSkills[2], - 3: props.jobSkills[3], - }) + setJob(props.job) + setSkills({ + 0: props.jobSkills[0], + 1: props.jobSkills[1], + 2: props.jobSkills[2], + 3: props.jobSkills[3], + }) - if (selectRef.current) selectRef.current.value = props.job.id - } + if (selectRef.current && props.job) selectRef.current.value = props.job.id }, [props]) useEffect(() => { @@ -68,10 +66,8 @@ const JobSection = (props: Props) => { }, [job]) function receiveJob(job?: Job) { - if (job) { - setJob(job) - props.saveJob(job) - } + setJob(job) + props.saveJob(job) } function generateImageUrl() { @@ -88,11 +84,13 @@ const JobSection = (props: Props) => { } const canEditSkill = (skill?: JobSkill) => { - if (job && skill) { - if (skill.job.id === job.id && skill.main && !skill.sub) return false - } + // If there is a job and a skill present in the slot + if (job) { + // If the skill's job is one of the job's main skill + if (skill && skill.job.id === job.id && skill.main) return false - return props.editable + return props.editable + } else return false } const skillItem = (index: number, editable: boolean) => { diff --git a/components/JobSkillResult/index.scss b/components/JobSkillResult/index.scss index a2cc2cdf..b558483c 100644 --- a/components/JobSkillResult/index.scss +++ b/components/JobSkillResult/index.scss @@ -56,7 +56,7 @@ } h5 { - color: var(--text-secondary); + color: var(--text-tertiary); display: inline-block; font-size: $font-medium; font-weight: $medium; diff --git a/components/JobSkillSearchFilterBar/index.tsx b/components/JobSkillSearchFilterBar/index.tsx index 088f6b53..4419f5f4 100644 --- a/components/JobSkillSearchFilterBar/index.tsx +++ b/components/JobSkillSearchFilterBar/index.tsx @@ -40,9 +40,11 @@ const JobSkillSearchFilterBar = (props: Props) => { return (
+
+ - + - -
- - - - + +