-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.js
More file actions
32 lines (27 loc) · 864 Bytes
/
Copy pathhome.js
File metadata and controls
32 lines (27 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// home.js – SkillSwap Home Page
(function () {
injectShell('nav-home');
// Dismiss setup card
const setupClose = document.getElementById('setupClose');
const setupCard = document.getElementById('setupCard');
if (setupClose && setupCard) {
setupClose.addEventListener('click', function () {
setupCard.style.display = 'none';
});
}
// Start Teaching — redirect directly, no popup
const btnTeach = document.querySelector('.btn-teach');
if (btnTeach) {
btnTeach.addEventListener('click', function (e) {
e.preventDefault();
window.location.href = 'teach.html';
});
}
// Gift invite
const giftLink = document.querySelector('.gift-link');
if (giftLink) {
giftLink.addEventListener('click', function () {
alert('Share your invite link:\nhttps://skillswap.io/invite/rayan');
});
}
})();