-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Links & Docs to BoK on VC creation (#7365)
* VC documents and links BoK - refactor the AddContent * VC documents and links implementation without validation; * resolve rabbit comments --------- Co-authored-by: Petar Kolev <[email protected]> Co-authored-by: reactoholic <[email protected]>
- Loading branch information
1 parent
60ab013
commit e3c092f
Showing
8 changed files
with
442 additions
and
211 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
199 changes: 0 additions & 199 deletions
199
src/main/topLevelPages/myDashboard/newVirtualContributorWizard/AddContent.tsx
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
src/main/topLevelPages/myDashboard/newVirtualContributorWizard/AddContent/AddContent.tsx
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { DialogContent } from '@mui/material'; | ||
import DialogHeader from '@/core/ui/dialog/DialogHeader'; | ||
import Gutters from '@/core/ui/grid/Gutters'; | ||
import { Caption } from '@/core/ui/typography'; | ||
import { gutters } from '@/core/ui/grid/utils'; | ||
import { AddContentForm } from './AddContentForm'; | ||
import { AddContentProps } from './AddContentProps'; | ||
import CancelDialog from '../CancelDialog'; | ||
import { StorageConfigContextProvider } from '@/domain/storage/StorageBucket/StorageConfigContext'; | ||
|
||
const AddContent = ({ onClose, onCreateVC, spaceId }: AddContentProps) => { | ||
const { t } = useTranslation(); | ||
const [dialogOpen, setDialogOpen] = useState(false); | ||
|
||
const onCancel = () => { | ||
setDialogOpen(true); | ||
}; | ||
|
||
return ( | ||
<StorageConfigContextProvider locationType="journey" spaceId={spaceId}> | ||
<DialogHeader onClose={onCancel}>{t('createVirtualContributorWizard.addContent.title')}</DialogHeader> | ||
<DialogContent> | ||
<Gutters disablePadding paddingBottom={gutters(2)}> | ||
<Caption>{t('createVirtualContributorWizard.addContent.description')}</Caption> | ||
<Caption fontWeight="bold">{t('createVirtualContributorWizard.addContent.descriptionBold')}</Caption> | ||
<AddContentForm onSubmit={onCreateVC} onCancel={onCancel} /> | ||
</Gutters> | ||
</DialogContent> | ||
<CancelDialog open={dialogOpen} onClose={() => setDialogOpen(false)} onConfirm={onClose} /> | ||
</StorageConfigContextProvider> | ||
); | ||
}; | ||
|
||
export default AddContent; |
Oops, something went wrong.