diff --git a/components/JobSection/index.tsx b/components/JobSection/index.tsx index 18c6f876..96bc374b 100644 --- a/components/JobSection/index.tsx +++ b/components/JobSection/index.tsx @@ -158,6 +158,26 @@ const JobSection = (props: Props) => { props.saveSkill(skill, position) } + const emptyJobLabel = ( +
+

{t('no_job')}

+
+ ) + + const filledJobLabel = ( +
+ {job?.name[locale]} +

{job?.name[locale]}

+
+ ) + + function jobLabel() { + return job ? filledJobLabel : emptyJobLabel + } + // Render: JSX components return (
diff --git a/components/SelectItem/index.tsx b/components/SelectItem/index.tsx index bf6f9b6b..083bfdb5 100644 --- a/components/SelectItem/index.tsx +++ b/components/SelectItem/index.tsx @@ -11,7 +11,7 @@ interface Props extends ComponentProps<'div'> { } const SelectItem = React.forwardRef(function selectItem( - { children, ...props }, + { children, value, iconSrc, altText, ...props }, forwardedRef ) { const { altText, iconSrc, ...rest } = props @@ -20,9 +20,9 @@ const SelectItem = React.forwardRef(function selectItem( className={classNames('SelectItem', props.className)} {...rest} ref={forwardedRef} - value={`${props.value}`} + value={`${value}`} > - {props.iconSrc ? {props.altText} : ''} + {iconSrc ? {altText} : ''} {children} )