forked from uc-cdis/commons-frontend-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: craigrbarnes <[email protected]>
- Loading branch information
1 parent
af135e3
commit fc879b9
Showing
1 changed file
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,49 @@ | ||
import { | ||
DiscoveryPage, | ||
NavPageLayout, | ||
NavPageLayoutProps, | ||
Discovery, | ||
DiscoveryPageGetServerSideProps as getServerSideProps, | ||
} from '@gen3/frontend'; | ||
|
||
import { Center, Text } from "@mantine/core"; | ||
|
||
import { registerDiscoveryCustomCellRenderers } from '@/lib/Discovery/CustomCellRenderers'; | ||
import { registerDiscoveryStudyPreviewRenderers } from '@/lib/Discovery/CustomRowRenderers'; | ||
|
||
registerDiscoveryCustomCellRenderers(); | ||
registerDiscoveryStudyPreviewRenderers(); | ||
|
||
export default DiscoveryPage; | ||
const DiscoveryPageCustom = ({ | ||
headerProps, | ||
footerProps, | ||
discoveryConfig, | ||
}: { | ||
headerProps: any, | ||
footerProps: any, | ||
discoveryConfig:any, | ||
}): JSX.Element => { | ||
|
||
if (discoveryConfig === undefined) { | ||
return ( | ||
<Center maw={400} h={100} mx="auto"> | ||
<div>Discovery config is not defined. Page disabled</div> | ||
</Center> | ||
); | ||
} | ||
|
||
return ( | ||
<NavPageLayout {...{ headerProps, footerProps }}> | ||
<div className="flex flex-col w-full"> | ||
<div className="flex bg-base-lightest rounded-4 justify-center align-middle px-2 pt-2"> | ||
<Text size="xl">AI Search is a Beta Feature. Please note that this is still in testing and we appreciate your feedback. You must login to use it. </Text> | ||
</div> | ||
|
||
<Discovery discoveryConfig={discoveryConfig} /> | ||
</div> | ||
</NavPageLayout> | ||
); | ||
}; | ||
|
||
export default DiscoveryPageCustom; | ||
|
||
export { getServerSideProps }; |