Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
Raspincel committed Sep 5, 2024
2 parents f27e10c + 382a838 commit 0f6d65d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/components/CardLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,24 @@ export default function CardLink({
userEmail: user.email,
}).then(() => {
if (page === ActivationTypePage.HACKATHON) {
window.open("https://47xzvrbdgjk.typeform.com/to/cqzci1gD", "_blank");
const url = "https://47xzvrbdgjk.typeform.com/to/cqzci1gD"
const newWindow = window.open(url, "_blank");

if (!newWindow || newWindow.closed || typeof newWindow.closed === 'undefined') {
window.location.href = url;
}

return;
}

if (page === ActivationTypePage.NEWSLETTER) {
window.open("https://47xzvrbdgjk.typeform.com/to/eGJ6c0Ah", "_blank");
const url = "https://47xzvrbdgjk.typeform.com/to/eGJ6c0Ah"
const newWindow = window.open(url, "_blank");

if (!newWindow || newWindow.closed || typeof newWindow.closed === 'undefined') {
window.location.href = url;
}

return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/UsersDashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export default function UsersDashboard() {
function createUser(user: IUser) {
const ball = createBall(user);

if (ballsRef.current?.some((ball) => ball.user.id === user.id)) return;
if (ballsRef.current?.some((ball) => ball.user.id === user?.id)) return;

ballsRef.current = [...ballsRef.current, ball];
setBalls((previous) => [...previous, ball]);
Expand Down

0 comments on commit 0f6d65d

Please sign in to comment.