Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make engagement tiles clickable #1847

Merged
merged 3 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { openNotification } from 'services/notificationService/notificationSlice
import { VideoWidget } from 'models/videoWidget';
import { fetchVideoWidgets } from 'services/widgetService/VideoService';
import ReactPlayer from 'react-player/lazy';
import { AppConfig } from 'config';

interface VideoWidgetProps {
widget: Widget;
Expand Down
14 changes: 13 additions & 1 deletion met-web/src/components/landing/EngagementTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,19 @@ const EngagementTile = ({ passedEngagement, engagementId }: EngagementTileProps)
const { name, end_date, start_date, description, status_id, banner_url, submission_status } = loadedEngagement;
const EngagementDate = `${dayjs(start_date).format(dateFormat)} to ${dayjs(end_date).format(dateFormat)}`;
return (
<Card sx={{ maxWidth: 345 }}>
<Card
sx={{
maxWidth: 345,
'&:hover': {
backgroundColor: '#F2F2F2',
cursor: 'pointer',
opacity: 0.5,
},
}}
onClick={() => {
window.open(engagementUrl, '_blank');
}}
>
<When condition={Boolean(banner_url)}>
<CardMedia sx={{ height: 140 }} image={banner_url} title={name} />
</When>
Expand Down
Loading