Skip to content

Commit f002ff1

Browse files
committed
feat: update algo for bubbles
1 parent 0ebc725 commit f002ff1

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

pwa/app/(con)/[locale]/con/2025/tickets/RegisterPage.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export default function RegisterPage() {
2727

2828
const isPastOffer = (offer: Offer) => {
2929
if (isActiveOffer(offer)) return false;
30-
console.log(offer.startDate);
31-
console.log(dayjs(offer.startDate).isBefore(dayjs(), "day"));
3230
if (offer.startDate && dayjs(offer.startDate).isBefore(dayjs(), "day"))
3331
return true;
3432
if (!offer.startDate) return true;

pwa/components/con/speakers/SpeakerImage2025.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ interface SpeakerImageProps {
1111
}
1212

1313
function nameToAngle(name: string): number {
14+
const nameToHash = name.substring(0, 12);
1415
let hash = 0;
15-
for (let i = 0; i < name.length; i++) {
16-
hash += name.charCodeAt(i);
16+
for (let i = 0; i < nameToHash.length; i++) {
17+
hash += nameToHash.charCodeAt(i);
1718
}
1819
let angle = hash % 360;
1920

@@ -42,7 +43,6 @@ function nameToSize(name: string, min = 10, max = 30) {
4243
}
4344

4445
function cssPositionOnCircle(angle: number) {
45-
// angle en radians
4646
return {
4747
x: `calc(50% + ${Math.cos(angle) * 50}%)`,
4848
y: `calc(50% + ${Math.sin(angle) * 50}%)`,

0 commit comments

Comments
 (0)