diff --git a/src/app/(authenticated)/companies/[id]/StandDetails.tsx b/src/app/(authenticated)/companies/[id]/StandDetails.tsx
index e4067d7..b5ed2aa 100644
--- a/src/app/(authenticated)/companies/[id]/StandDetails.tsx
+++ b/src/app/(authenticated)/companies/[id]/StandDetails.tsx
@@ -11,19 +11,19 @@ export default function StandDetails({ standDetails }: StandDetailsProps) {
{standDetails ? (
<>
0 ? 2 : 1} />
{standDetails.chairs} Chairs
{standDetails.table ? "Want table" : "No table"}
Math.random() - 0.5).slice(0, N_SPEAKER_TILES)
: [];
- const spinWheelData = user.signatures?.find(
- (s) => s.edition === event?.id && isToday(s.day)
- );
+ const spinWheelData = getUserActiveSignatureData(user, event?.id ?? ``);
const showSpinWheelSection =
- !isCompany(user.role) && !spinWheelData?.redeemed;
+ isAttendee(user.role) && !spinWheelData?.redeemed;
return (
diff --git a/src/app/(authenticated)/profile/edit/EditProfileForm.tsx b/src/app/(authenticated)/profile/edit/EditProfileForm.tsx
index 7a6a081..78aa970 100644
--- a/src/app/(authenticated)/profile/edit/EditProfileForm.tsx
+++ b/src/app/(authenticated)/profile/edit/EditProfileForm.tsx
@@ -590,11 +590,9 @@ export default function EditProfileForm({
-
+
+ Venue
+
Speakers
Companies
-
- Venue
+
+ Prizes
-
diff --git a/src/components/user/CurriculumVitae.tsx b/src/components/user/CurriculumVitae.tsx
index fbff76d..8036fd9 100644
--- a/src/components/user/CurriculumVitae.tsx
+++ b/src/components/user/CurriculumVitae.tsx
@@ -125,7 +125,7 @@ export default function CurriculumVitae({
<>
router.push("/terms-and-conditions/cv")}
/>
diff --git a/src/styles/globals.css b/src/styles/globals.css
index a87e5cf..57fca3d 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -45,11 +45,11 @@
transform: translate(-150%, -150%);
opacity: 0;
}
- 5% {
+ 10% {
transform: translate(150%, 150%);
opacity: 1;
}
- 10% {
+ 20% {
opacity: 0;
}
100% {
@@ -74,5 +74,5 @@
);
transform: translate(-150%, -150%);
opacity: 0;
- animation: shine 30s infinite linear;
+ animation: shine 15s infinite linear;
}
diff --git a/src/utils/utils.ts b/src/utils/utils.ts
index 44d2197..7c315a9 100644
--- a/src/utils/utils.ts
+++ b/src/utils/utils.ts
@@ -14,6 +14,11 @@ export function convertToAppRole(role: string): UserRole {
}
}
+export function isAttendee(role: string): boolean {
+ const appRole = convertToAppRole(role);
+ return appRole === "Attendee";
+}
+
export function isMember(role: string): boolean {
const appRole = convertToAppRole(role);
return appRole === "Member" || appRole === "Admin";
@@ -146,3 +151,27 @@ export function getSessionColor(sessionKind: string) {
return "#000";
}
}
+
+export function getUserActiveSignatureData(user: User, edition: string) {
+ let relevantSignatures = user.signatures?.find(
+ (s) => s.edition === edition && isToday(s.day)
+ );
+ if (!relevantSignatures) return null;
+
+ const singatureMap: { [key: string]: SINFOSignature } = {};
+ relevantSignatures.signatures.map((s) => {
+ const curr = singatureMap[s.companyId];
+ if (!curr) {
+ singatureMap[s.companyId] = s;
+ return;
+ }
+ if (new Date(s.date) < new Date(curr.date)) {
+ singatureMap[s.date] = s;
+ }
+ });
+
+ return {
+ ...relevantSignatures,
+ signatures: Object.values(singatureMap),
+ };
+}