|
| 1 | +import { Box, Button, Typography } from '@mui/material'; |
| 2 | +import { useState } from 'react'; |
| 3 | +import { useParams } from 'react-router-dom'; |
| 4 | +import BaseDialog from './Dialogs/BaseDialog'; |
| 5 | + |
| 6 | +const InfoPopup: React.FC = () => { |
| 7 | + const { projectId } = useParams<{ projectId: string | undefined }>(); |
| 8 | + const localStorageKey = `${projectId}-hide-info-popup`; |
| 9 | + const shouldHide = !!localStorage.getItem(localStorageKey); |
| 10 | + const [hide, setShouldHide] = useState(shouldHide); |
| 11 | + |
| 12 | + const handleCloseDialog = () => { |
| 13 | + setShouldHide(true); |
| 14 | + window.localStorage.setItem(localStorageKey, 'true'); |
| 15 | + }; |
| 16 | + |
| 17 | + return ( |
| 18 | + <BaseDialog |
| 19 | + dialogTitle="Welcome to the new Curation interface!" |
| 20 | + isOpen={!hide} |
| 21 | + onCloseDialog={handleCloseDialog} |
| 22 | + > |
| 23 | + <Box> |
| 24 | + <Typography gutterBottom> |
| 25 | + We've made some significant changes to make the UI more useful and intuitive. |
| 26 | + </Typography> |
| 27 | + <Typography gutterBottom> |
| 28 | + We're also introducing <b>AI Assisted Curation</b>. This feature uses LLMs to extract key study |
| 29 | + information (e.g. demographics, design & task details) from the full text of papers, making it |
| 30 | + easier to screen studies for inclusion. |
| 31 | + </Typography> |
| 32 | + <Typography gutterBottom>To get started, import studies into curation.</Typography> |
| 33 | + <Typography> |
| 34 | + In the <i>simple workflow</i>, AI-extracted information will be shown in the table, as well as |
| 35 | + individual study pages. |
| 36 | + </Typography> |
| 37 | + <Typography> |
| 38 | + For <i>PRISMA</i>, this feature is available after the Identification step. |
| 39 | + </Typography> |
| 40 | + <Box sx={{ display: 'flex', justifyContent: 'space-between', marginTop: '1rem' }}> |
| 41 | + <Button fullWidth onClick={handleCloseDialog} variant="contained" color="primary" disableElevation> |
| 42 | + Continue |
| 43 | + </Button> |
| 44 | + </Box> |
| 45 | + </Box> |
| 46 | + </BaseDialog> |
| 47 | + ); |
| 48 | +}; |
| 49 | + |
| 50 | +export default InfoPopup; |
0 commit comments