mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 00:03:27 +10:00
feat(client/import): implement import json from reactive resume v2
This commit is contained in:
@ -24,6 +24,7 @@ const ImportExternalModal: React.FC = () => {
|
||||
const linkedinInputRef = useRef<HTMLInputElement>(null);
|
||||
const jsonResumeInputRef = useRef<HTMLInputElement>(null);
|
||||
const reactiveResumeInputRef = useRef<HTMLInputElement>(null);
|
||||
const reactiveResumeV2InputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const { open: isOpen } = useAppSelector((state) => state.modal['dashboard.import-external']);
|
||||
|
||||
@ -49,6 +50,11 @@ const ImportExternalModal: React.FC = () => {
|
||||
reactiveResumeInputRef.current.click();
|
||||
reactiveResumeInputRef.current.value = '';
|
||||
}
|
||||
} else if (integration === 'reactive-resume-v2') {
|
||||
if (reactiveResumeV2InputRef.current) {
|
||||
reactiveResumeV2InputRef.current.click();
|
||||
reactiveResumeV2InputRef.current.value = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -171,7 +177,7 @@ const ImportExternalModal: React.FC = () => {
|
||||
|
||||
<p className="mb-2">{t('modals.dashboard.import-external.reactive-resume.body')}</p>
|
||||
|
||||
<div>
|
||||
<div className="flex gap-4">
|
||||
<Button
|
||||
variant="contained"
|
||||
disabled={isLoading}
|
||||
@ -181,6 +187,15 @@ const ImportExternalModal: React.FC = () => {
|
||||
{t('modals.dashboard.import-external.reactive-resume.actions.upload-json')}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
variant="contained"
|
||||
disabled={isLoading}
|
||||
startIcon={<UploadFile />}
|
||||
onClick={() => handleClick('reactive-resume-v2')}
|
||||
>
|
||||
{t('modals.dashboard.import-external.reactive-resume.actions.upload-json-v2')}
|
||||
</Button>
|
||||
|
||||
<input
|
||||
hidden
|
||||
type="file"
|
||||
@ -188,6 +203,14 @@ const ImportExternalModal: React.FC = () => {
|
||||
onChange={(event) => handleChange(event, 'reactive-resume')}
|
||||
accept="application/json"
|
||||
/>
|
||||
|
||||
<input
|
||||
hidden
|
||||
type="file"
|
||||
ref={reactiveResumeV2InputRef}
|
||||
onChange={(event) => handleChange(event, 'reactive-resume-v2')}
|
||||
accept="application/json"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</BaseModal>
|
||||
|
||||
Reference in New Issue
Block a user