diff --git a/packages/jaen-pages/src/containers/ui/tabs/SettingsTab.tsx b/packages/jaen-pages/src/containers/ui/tabs/SettingsTab.tsx index 39c72cd8..c5f8a841 100644 --- a/packages/jaen-pages/src/containers/ui/tabs/SettingsTab.tsx +++ b/packages/jaen-pages/src/containers/ui/tabs/SettingsTab.tsx @@ -36,7 +36,7 @@ const SettingsTab: React.FC<{}> = () => { mode="selector" onSelectorClose={fileSelector.onClose} onSelectorSelect={i => { - handleValuesChange({image: i.src}) + handleValuesChange({...siteMetadata, image: i.src}) fileSelector.onClose() }} diff --git a/packages/jaen-shared-ui/src/components/molecules/SiteSettings/index.tsx b/packages/jaen-shared-ui/src/components/molecules/SiteSettings/index.tsx index 7b62ba2f..a9b23372 100644 --- a/packages/jaen-shared-ui/src/components/molecules/SiteSettings/index.tsx +++ b/packages/jaen-shared-ui/src/components/molecules/SiteSettings/index.tsx @@ -172,9 +172,16 @@ const SiteSettings: React.FC = props => { Name handleValuesChange('description', e)} + onChange={e => + setValues({ + ...values, + author: { + name: e.target.value + } + }) + } onBlur={handleValuesCb} /> @@ -193,27 +200,54 @@ const SiteSettings: React.FC = props => { Name handleValuesChange('description', e)} + onChange={e => + setValues({ + ...values, + organization: { + name: e.target.value, + url: values.organization?.url || '', + logo: values.organization?.logo || '' + } + }) + } onBlur={handleValuesCb} /> URL handleValuesChange('description', e)} + onChange={e => + setValues({ + ...values, + organization: { + name: values.organization?.name || '', + url: e.target.value, + logo: values.organization?.logo || '' + } + }) + } onBlur={handleValuesCb} /> Logo handleValuesChange('description', e)} + onChange={e => + setValues({ + ...values, + organization: { + name: values.organization?.name || '', + url: values.organization?.url || '', + logo: e.target.value + } + }) + } onBlur={handleValuesCb} /> @@ -228,7 +262,10 @@ const SiteSettings: React.FC = props => { transition="0.2s all" objectFit="cover" _hover={{filter: 'brightness(70%)', cursor: 'pointer'}} - onClick={props.onImageClick} + onClick={() => { + handleValuesCb() + props.onImageClick() + }} />