|
| 1 | +import { Spinner } from '@terra-ui-packages/components'; |
| 2 | +import React from 'react'; |
| 3 | +import FooterWrapper from 'src/components/FooterWrapper'; |
| 4 | +import { pipelinesTopBar } from 'src/pages/scientificServices/pipelines/common/scientific-services-common'; |
| 5 | +import { DocsKey, ZendeskLink } from 'src/pages/scientificServices/pipelines/common/zendeskUtils'; |
| 6 | +import { usePipelinesList } from 'src/pages/scientificServices/pipelines/hooks/usePipelinesList'; |
| 7 | +import { AoUStylizedString } from 'src/pages/scientificServices/pipelines/utils/AoUStylizedString'; |
| 8 | + |
| 9 | +export const About = () => { |
| 10 | + const { isLoading, error, pipelines } = usePipelinesList(); |
| 11 | + |
| 12 | + return ( |
| 13 | + <FooterWrapper alwaysShow> |
| 14 | + {pipelinesTopBar('about')} |
| 15 | + <div style={{ marginLeft: '2rem', marginTop: '1rem' }}> |
| 16 | + <h1>Scientific Services from the Broad Data Sciences Platform</h1> |
| 17 | + <h2 style={{ marginTop: '2rem' }}>Pipelines</h2> |
| 18 | + |
| 19 | + {isLoading && <Spinner />} |
| 20 | + |
| 21 | + {error && <div style={{ color: 'red' }}>{error.message}</div>} |
| 22 | + |
| 23 | + {pipelines?.map((pipeline) => ( |
| 24 | + <div key={pipeline.pipelineName}> |
| 25 | + <h3> |
| 26 | + <AoUStylizedString text={pipeline.displayName} /> |
| 27 | + </h3> |
| 28 | + <div style={{ width: '50%' }}> |
| 29 | + {pipeline.description ? ( |
| 30 | + <AoUStylizedString text={pipeline.description} /> |
| 31 | + ) : ( |
| 32 | + <em>No description available</em> |
| 33 | + )} |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + ))} |
| 37 | + |
| 38 | + <h2 style={{ marginTop: '2rem' }}>User Documentation</h2> |
| 39 | + <div style={{ marginTop: '1rem' }}> |
| 40 | + <ZendeskLink docsKey={DocsKey.GETTING_STARTED} additionalStyle={{ fontWeight: 'bold' }}> |
| 41 | + Get Started |
| 42 | + </ZendeskLink> |
| 43 | + </div> |
| 44 | + <div style={{ marginTop: '1rem' }}> |
| 45 | + <ZendeskLink docsKey={DocsKey.ABOUT_SERVICE} additionalStyle={{ fontWeight: 'bold' }}> |
| 46 | + About this Service |
| 47 | + </ZendeskLink> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + </FooterWrapper> |
| 51 | + ); |
| 52 | +}; |
0 commit comments