Skip to content

Commit 12e5982

Browse files
committed
Update shareContent function to include title and organizer in share text
1 parent a9c9dd2 commit 12e5982

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Page/OpportunitiesHub/BootcampsList.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const shareContent = (url) => {
77
if (navigator.share) {
88
navigator
99
.share({
10-
title: 'Check out this event!',
11-
text: 'Explore and participate on this amazing tech events!',
10+
title: '',
11+
text: '',
1212
url: url,
1313
})
1414
.then(() => console.log('Successful share'))

src/Page/OpportunitiesHub/CertificationList.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import styled from 'styled-components';
33
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
44
import { faFlag, faMapMarkerAlt, faCalendarAlt, faShareAlt } from '@fortawesome/free-solid-svg-icons';
55

6-
const shareContent = (url) => {
6+
const shareContent = (url, title, organizer) => {
77
if (navigator.share) {
88
navigator
99
.share({
10-
title: 'Check out this event!',
11-
text: 'Explore and participate on this amazing tech events!',
10+
title: title,
11+
text: `Check out this certification organized by ${organizer}!`,
1212
url: url,
1313
})
1414
.then(() => console.log('Successful share'))

0 commit comments

Comments
 (0)