diff --git a/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx b/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx index 3b81185c..b2fdf019 100644 --- a/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx +++ b/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx @@ -79,25 +79,6 @@ const DocumentInformation: React.FC = ({ } }, [isEditForm]); - const validateRepo = (repoStr: string) => { - const repo = repoStr.trim(); - if (repo.length === 0) { - setDisableAction(true); - setValidRepo(ValidatedOptions.error); - return; - } - try { - new URL(repo); - setValidRepo(ValidatedOptions.success); - setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return; - } catch (e) { - setDisableAction(true); - setValidRepo(ValidatedOptions.warning); - return; - } - }; - const validateCommit = (commitStr: string) => { const commit = commitStr.trim(); if (commit.length > 0) { @@ -283,7 +264,7 @@ const DocumentInformation: React.FC = ({ {!useFileUpload ? ( <> - + = ({ placeholder="Enter repo URL where document exists" value={knowledgeDocumentRepositoryUrl} onChange={(_event, value) => setKnowledgeDocumentRepositoryUrl(value)} - onBlur={() => validateRepo(knowledgeDocumentRepositoryUrl)} /> - {validRepo === ValidatedOptions.error && ( - - - } variant={validRepo}> - Required field - - - - )} - {validRepo === ValidatedOptions.warning && ( - - - } variant="error"> - Please enter a valid URL. - - - - )} = ({ color: '#333' }} > - A commit SHA ({commitSha}) has already been selected in a previous seed example. All subsequent selections must use the - same commit SHA for consistency. + + A commit SHA ({commitSha}) has already been selected in a previous seed example. All subsequent selections must use the + same commit SHA for consistency. + + {/*A commit SHA ({commitSha}) has already been selected in a previous seed example. All subsequent selections must use the*/} + {/*same commit SHA for consistency.*/} )} diff --git a/src/components/Contribute/Knowledge/ReviewSubmission/index.tsx b/src/components/Contribute/Knowledge/ReviewSubmission/index.tsx index 577fa5da..3e39715c 100644 --- a/src/components/Contribute/Knowledge/ReviewSubmission/index.tsx +++ b/src/components/Contribute/Knowledge/ReviewSubmission/index.tsx @@ -23,19 +23,19 @@ export const ReviewSubmission: React.FC = ({ knowledgeFor {/* Knowledge Information */}

Knowledge Information

- Submission Summary: {knowledgeFormData.submissionSummary || 'N/A'} + Submission Summary: {knowledgeFormData.submissionSummary}

- Domain: {knowledgeFormData.domain || 'N/A'} + Domain: {knowledgeFormData.domain}

- Document Outline: {knowledgeFormData.documentOutline || 'N/A'} + Document Outline: {knowledgeFormData.documentOutline}

{/* File Path Information */}

File Path Information

- File Path: {knowledgeFormData.filePath || 'N/A'} + File Path: {knowledgeFormData.filePath}

{/* Seed Examples */} @@ -44,15 +44,15 @@ export const ReviewSubmission: React.FC = ({ knowledgeFor

Seed Example {index + 1}

- Context: {seedExample.context || 'N/A'} + Context: {seedExample.context}

{seedExample.questionAndAnswers.map((qa, qaIndex) => (

- Question {qaIndex + 1}: {qa.question || 'N/A'} + Question {qaIndex + 1}: {qa.question}

- Answer {qaIndex + 1}: {qa.answer || 'N/A'} + Answer {qaIndex + 1}: {qa.answer}

))} @@ -61,38 +61,32 @@ export const ReviewSubmission: React.FC = ({ knowledgeFor {/* Document Information */}

Document Information

- {knowledgeFormData.knowledgeDocumentRepositoryUrl && knowledgeFormData.knowledgeDocumentCommit ? ( -
-

- Repository URL: {knowledgeFormData.knowledgeDocumentRepositoryUrl} -

-

- Commit SHA: {knowledgeFormData.knowledgeDocumentCommit} -

-

- Document Names: {knowledgeFormData.documentName || 'N/A'} -

-
- ) : ( -

No Document Information Provided.

- )} +

+ Repository URL: {knowledgeFormData.knowledgeDocumentRepositoryUrl} +

+

+ Commit: {knowledgeFormData.knowledgeDocumentCommit} +

+

+ Document Name: {knowledgeFormData.documentName} +

{/* Attribution Information */}

Attribution Information

- Title of Work: {knowledgeFormData.titleWork || 'N/A'} + Title of Work: {knowledgeFormData.titleWork}

- Link to Work: {knowledgeFormData.linkWork || 'N/A'} + Link to Work: {knowledgeFormData.linkWork}

- Revision: {knowledgeFormData.revision || 'N/A'} + Revision: {knowledgeFormData.revision}

- License of Work: {knowledgeFormData.licenseWork || 'N/A'} + License of Work: {knowledgeFormData.licenseWork}

- Creators: {knowledgeFormData.creators || 'N/A'} + Creators: {knowledgeFormData.creators}

);