-
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.
chore: merge origin/master back into 55/pagination
- Loading branch information
Showing
19 changed files
with
253 additions
and
134 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
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
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
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,35 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import IconButton from '@material-ui/core/IconButton'; | ||
import PlayCircleFilledIcon from '@material-ui/icons/PlayCircleFilled'; | ||
import { useTranslation } from 'react-i18next'; | ||
import Tooltip from '@material-ui/core/Tooltip'; | ||
import { redirect } from '../../utils/navigation'; | ||
import { buildGraaspPerformView } from '../../config/paths'; | ||
import { buildPerformButtonId } from '../../config/selectors'; | ||
|
||
const PerformViewButton = ({ itemId }) => { | ||
const { t } = useTranslation(); | ||
|
||
const onClickPerformView = () => { | ||
redirect(buildGraaspPerformView(itemId), { openInNewTab: true }); | ||
}; | ||
|
||
return ( | ||
<Tooltip title={t('Show Perform View')}> | ||
<IconButton | ||
aria-label={t('perform view')} | ||
onClick={onClickPerformView} | ||
id={buildPerformButtonId(itemId)} | ||
> | ||
<PlayCircleFilledIcon fontSize="small" /> | ||
</IconButton> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
PerformViewButton.propTypes = { | ||
itemId: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default PerformViewButton; |
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
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
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
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.