Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Swapping the automatic documant upload with the manual upload. #92

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/Contribute/Knowledge/index.tsx
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ export const KnowledgeForm: React.FunctionComponent = () => {
const [success_alert_message, setSuccessAlertMessage] = useState<React.ReactNode>('');
const [successAlertLink, setSuccessAlertLink] = useState<string>('');

const [useFileUpload, setUseFileUpload] = useState(false);
const [useFileUpload, setUseFileUpload] = useState(true);
const [uploadedFiles, setUploadedFiles] = useState<File[]>([]);

const [isModalOpen, setIsModalOpen] = useState(false);
@@ -581,20 +581,20 @@ Creator names: ${creators}
>
<FormGroup>
<div style={{ display: 'flex', gap: '10px' }}>
<Button
variant={useFileUpload ? 'secondary' : 'primary'}
className={!useFileUpload ? 'button-active' : 'button-secondary'}
onClick={() => setUseFileUpload(false)}
>
Manually Enter Document Details
</Button>
<Button
variant={useFileUpload ? 'primary' : 'secondary'}
className={useFileUpload ? 'button-active' : 'button-secondary'}
onClick={() => setUseFileUpload(true)}
>
Automatically Upload Documents
</Button>
<Button
variant={useFileUpload ? 'secondary' : 'primary'}
className={!useFileUpload ? 'button-active' : 'button-secondary'}
onClick={() => setUseFileUpload(false)}
>
Manually Enter Document Details
</Button>
</div>
</FormGroup>