-
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.
- The view is not responsive yet - Contain problems yet with the SDK and the query-client
- Loading branch information
Showing
9 changed files
with
894 additions
and
409 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 |
---|---|---|
|
@@ -17,8 +17,8 @@ | |
"@emotion/react": "11.11.1", | ||
"@emotion/styled": "11.11.0", | ||
"@graasp/chatbox": "3.0.0", | ||
"@graasp/query-client": "2.0.0", | ||
"@graasp/sdk": "2.0.1", | ||
"@graasp/query-client": "github:graasp/graasp-query-client#664-add-short-links-feature", | ||
"@graasp/sdk": "github:graasp/graasp-sdk#664-add-short-links-feature", | ||
"@graasp/translations": "1.19.4", | ||
"@graasp/ui": "4.0.0", | ||
"@mui/icons-material": "5.14.16", | ||
|
@@ -147,7 +147,7 @@ | |
"vite-plugin-istanbul": "5.0.0" | ||
}, | ||
"resolutions": { | ||
"@graasp/sdk": "2.0.1" | ||
"@graasp/sdk": "github:graasp/graasp-sdk#664-add-short-links-feature" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
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
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,53 @@ | ||
import Button from '@mui/material/Button'; | ||
import Dialog from '@mui/material/Dialog'; | ||
import DialogActions from '@mui/material/DialogActions'; | ||
import DialogContent from '@mui/material/DialogContent'; | ||
import DialogContentText from '@mui/material/DialogContentText'; | ||
import DialogTitle from '@mui/material/DialogTitle'; | ||
import { Dispatch, SetStateAction } from 'react'; | ||
|
||
interface DeleteLinkProps { | ||
open: boolean; | ||
setOpen: Dispatch<SetStateAction<boolean>>; | ||
handleDelete: () => void; | ||
} | ||
|
||
const ConfirmDeleteLink = ({ open, setOpen, handleDelete }: DeleteLinkProps): JSX.Element => { | ||
|
||
const handleClose = () => { | ||
setOpen(false); | ||
}; | ||
|
||
const handleClickDelete = () => { | ||
setOpen(false); | ||
handleDelete(); | ||
} | ||
|
||
return ( | ||
<div> | ||
<Dialog | ||
open={open} | ||
onClose={handleClose} | ||
aria-labelledby="alert-dialog-title" | ||
aria-describedby="alert-dialog-description" | ||
> | ||
<DialogTitle id="alert-dialog-title"> | ||
Confirm the suppression of the short link ? | ||
</DialogTitle> | ||
<DialogContent> | ||
<DialogContentText id="alert-dialog-description"> | ||
You are removing the short link, do you want to continue ? | ||
</DialogContentText> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={handleClose} autoFocus>Cancel</Button> | ||
<Button onClick={handleClickDelete} color='error'> | ||
Delete | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ConfirmDeleteLink; |
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
Oops, something went wrong.