diff --git a/backend/api/grants/mutations.py b/backend/api/grants/mutations.py index 3b3c286d10..3802934cee 100644 --- a/backend/api/grants/mutations.py +++ b/backend/api/grants/mutations.py @@ -1,6 +1,7 @@ from dataclasses import asdict from enum import Enum from typing import Annotated, Union, Optional +from participants.models import Participant from privacy_policy.record import record_privacy_policy_acceptance import strawberry @@ -42,11 +43,13 @@ class _GrantErrors: notes: list[str] = strawberry.field(default_factory=list) travelling_from: list[str] = strawberry.field(default_factory=list) non_field_errors: list[str] = strawberry.field(default_factory=list) - website: list[str] = strawberry.field(default_factory=list) - twitter_handle: list[str] = strawberry.field(default_factory=list) - github_handle: list[str] = strawberry.field(default_factory=list) - linkedin_url: list[str] = strawberry.field(default_factory=list) - mastodon_handle: list[str] = strawberry.field(default_factory=list) + participant_bio: list[str] = strawberry.field(default_factory=list) + participant_website: list[str] = strawberry.field(default_factory=list) + participant_twitter_handle: list[str] = strawberry.field(default_factory=list) + participant_instagram_handle: list[str] = strawberry.field(default_factory=list) + participant_linkedin_url: list[str] = strawberry.field(default_factory=list) + participant_facebook_url: list[str] = strawberry.field(default_factory=list) + participant_mastodon_handle: list[str] = strawberry.field(default_factory=list) errors: _GrantErrors = None @@ -113,11 +116,14 @@ class SendGrantInput(BaseGrantInput): why: str notes: str travelling_from: str - website: str - twitter_handle: str - github_handle: str - linkedin_url: str - mastodon_handle: str + + participant_bio: str + participant_website: str + participant_twitter_handle: str + participant_instagram_handle: str + participant_linkedin_url: str + participant_facebook_url: str + participant_mastodon_handle: str def validate(self, conference: Conference, user: User) -> GrantErrors | None: errors = super().validate(conference=conference, user=user) @@ -147,11 +153,14 @@ class UpdateGrantInput(BaseGrantInput): why: str notes: str travelling_from: str - website: str - twitter_handle: str - github_handle: str - linkedin_url: str - mastodon_handle: str + + participant_bio: str + participant_website: str + participant_twitter_handle: str + participant_instagram_handle: str + participant_linkedin_url: str + participant_facebook_url: str + participant_mastodon_handle: str def validate(self, conference: Conference, user: User) -> GrantErrors | None: return super().validate(conference=conference, user=user).if_has_errors @@ -205,9 +214,23 @@ def send_grant(self, info: Info, input: SendGrantInput) -> SendGrantResult: with transaction.atomic(): instance = GrantModel.objects.create( **{ - **asdict(input), "user_id": request.user.id, "conference": conference, + "name": input.name, + "full_name": input.full_name, + "age_group": input.age_group, + "gender": input.gender, + "occupation": input.occupation, + "grant_type": input.grant_type, + "python_usage": input.python_usage, + "been_to_other_events": input.been_to_other_events, + "community_contribution": input.community_contribution, + "needs_funds_for_travel": input.needs_funds_for_travel, + "need_visa": input.need_visa, + "need_accommodation": input.need_accommodation, + "why": input.why, + "notes": input.notes, + "travelling_from": input.travelling_from, } ) @@ -217,6 +240,20 @@ def send_grant(self, info: Info, input: SendGrantInput) -> SendGrantResult: "grant", ) + Participant.objects.update_or_create( + user_id=request.user.id, + conference=instance.conference, + defaults={ + "bio": input.participant_bio, + "website": input.participant_website, + "twitter_handle": input.participant_twitter_handle, + "instagram_handle": input.participant_instagram_handle, + "linkedin_url": input.participant_linkedin_url, + "facebook_url": input.participant_facebook_url, + "mastodon_handle": input.participant_mastodon_handle, + }, + ) + # hack because we return django models instance.__strawberry_definition__ = Grant.__strawberry_definition__ return instance @@ -239,6 +276,20 @@ def update_grant(self, info: Info, input: UpdateGrantInput) -> UpdateGrantResult setattr(instance, attr, value) instance.save() + Participant.objects.update_or_create( + user_id=request.user.id, + conference=instance.conference, + defaults={ + "bio": input.participant_bio, + "website": input.participant_website, + "twitter_handle": input.participant_twitter_handle, + "instagram_handle": input.participant_instagram_handle, + "linkedin_url": input.participant_linkedin_url, + "facebook_url": input.participant_facebook_url, + "mastodon_handle": input.participant_mastodon_handle, + }, + ) + instance.__strawberry_definition__ = Grant.__strawberry_definition__ return instance diff --git a/backend/api/grants/tests/test_send_grant.py b/backend/api/grants/tests/test_send_grant.py index 08b1ae2c77..8e37b95fd6 100644 --- a/backend/api/grants/tests/test_send_grant.py +++ b/backend/api/grants/tests/test_send_grant.py @@ -2,6 +2,8 @@ from conferences.tests.factories import ConferenceFactory from grants.tests.factories import GrantFactory import pytest +from participants.models import Participant + pytestmark = pytest.mark.django_db @@ -35,11 +37,13 @@ def _send_grant(client, conference, conference_code=None, **kwargs): validationWhy: why validationNotes: notes validationTravellingFrom: travellingFrom - validationWebsite: website - validationTwitterHandle: twitterHandle - validationGithubHandle: githubHandle - validationLinkedinUrl: linkedinUrl - validationMastodonHandle: mastodonHandle + validationParticipantBio: participantBio + validationParticipantWebsite: participantWebsite + validationParticipantTwitterHandle: participantTwitterHandle + validationparticipantInstagramHandle: participantInstagramHandle + validationParticipantLinkedinUrl: participantLinkedinUrl + validationParticipantFacebookUrl: participantFacebookUrl + validationParticipantMastodonHandle: participantMastodonHandle nonFieldErrors } } @@ -64,11 +68,13 @@ def _send_grant(client, conference, conference_code=None, **kwargs): "why": grant.why, "notes": grant.notes, "travellingFrom": grant.travelling_from, - "website": grant.website, - "twitterHandle": grant.twitter_handle, - "githubHandle": grant.github_handle, - "linkedinUrl": grant.linkedin_url, - "mastodonHandle": grant.mastodon_handle, + "participantBio": "my bio", + "participantWebsite": "http://website.it", + "participantTwitterHandle": "handle", + "participantInstagramHandle": "handleinsta", + "participantLinkedinUrl": "https://linkedin.com/fake-link", + "participantFacebookUrl": "https://facebook.com/fake-link", + "participantMastodonHandle": "fake@mastodon.social", } variables = {**defaults, **kwargs} @@ -87,6 +93,9 @@ def test_send_grant(graphql_client, user): assert response["data"]["sendGrant"]["__typename"] == "Grant" assert response["data"]["sendGrant"]["id"] + participant = Participant.objects.get(conference=conference, user_id=user.id) + assert participant.bio == "my bio" + assert PrivacyPolicyAcceptanceRecord.objects.filter( user=user, conference=conference, privacy_policy="grant" ).exists() diff --git a/backend/api/grants/tests/test_update_grant.py b/backend/api/grants/tests/test_update_grant.py index bde674618b..0138e1b89f 100644 --- a/backend/api/grants/tests/test_update_grant.py +++ b/backend/api/grants/tests/test_update_grant.py @@ -2,6 +2,7 @@ from conferences.tests.factories import ConferenceFactory from grants.tests.factories import GrantFactory import pytest +from participants.models import Participant pytestmark = pytest.mark.django_db @@ -34,11 +35,13 @@ def _update_grant(graphql_client, grant, **kwargs): validationWhy: why validationNotes: notes validationTravellingFrom: travellingFrom - validationWebsite: website - validationTwitterHandle: twitterHandle - validationGithubHandle: githubHandle - validationLinkedinUrl: linkedinUrl - validationMastodonHandle: mastodonHandle + validationParticipantBio: participantBio + validationParticipantWebsite: participantWebsite + validationParticipantTwitterHandle: participantTwitterHandle + validationParticipantInstagramHandle: participantInstagramHandle + validationParticipantLinkedinUrl: participantLinkedinUrl + validationParticipantFacebookUrl: participantFacebookUrl + validationparticipantMastodonHandle: participantMastodonHandle nonFieldErrors } } @@ -63,11 +66,13 @@ def _update_grant(graphql_client, grant, **kwargs): "why": grant.why, "notes": grant.notes, "travellingFrom": grant.travelling_from, - "website": grant.website, - "twitterHandle": grant.twitter_handle, - "githubHandle": grant.github_handle, - "linkedinUrl": grant.linkedin_url, - "mastodonHandle": grant.mastodon_handle, + "participantBio": "bio", + "participantWebsite": "http://website.it", + "participantTwitterHandle": "handle", + "participantInstagramHandle": "handleinsta", + "participantLinkedinUrl": "https://linkedin.com/fake-link", + "participantFacebookUrl": "https://facebook.com/fake-link", + "participantMastodonHandle": "fake@mastodon.social", } variables = { @@ -105,11 +110,8 @@ def test_update_grant(graphql_client, user): why="why not", notes="🧸", travellingFrom="GB", - website="https://marcotte.house", - twitterHandle="@marcottebear", - githubHandle="marcottebear", - linkedinUrl="www.linkedin.com/in/marcotteba", - mastodonHandle="marcottebear@marcotte.party", + participantFacebookUrl="http://facebook.com/pythonpizza", + participantLinkedinUrl="http://linkedin.com/company/pythonpizza", ) grant.refresh_from_db() @@ -117,6 +119,10 @@ def test_update_grant(graphql_client, user): assert not response.get("errors") assert response["data"]["updateGrant"]["__typename"] == "Grant" + participant = Participant.objects.first() + assert participant.facebook_url == "http://facebook.com/pythonpizza" + assert participant.linkedin_url == "http://linkedin.com/company/pythonpizza" + def test_cannot_update_a_grant_if_user_is_not_owner( graphql_client, diff --git a/backend/api/grants/types.py b/backend/api/grants/types.py index 71e5cca28b..87ba072fcf 100644 --- a/backend/api/grants/types.py +++ b/backend/api/grants/types.py @@ -4,6 +4,8 @@ from typing import Optional import strawberry +from api.participants.types import Participant +from participants.models import Participant as ParticipantModel from grants.models import Grant as GrantModel @@ -33,14 +35,16 @@ class Grant: notes: str travelling_from: Optional[str] applicant_reply_deadline: Optional[datetime] - website: str - twitter_handle: str - github_handle: str - linkedin_url: str - mastodon_handle: str + + participant: Participant @classmethod def from_model(cls, grant: GrantModel) -> Grant: + participant = ParticipantModel.objects.filter( + user_id=grant.user_id, + conference=grant.conference, + ).first() + return cls( id=grant.id, status=Status(grant.status), @@ -60,9 +64,5 @@ def from_model(cls, grant: GrantModel) -> Grant: notes=grant.notes, travelling_from=grant.travelling_from, applicant_reply_deadline=grant.applicant_reply_deadline, - website=grant.website, - twitter_handle=grant.twitter_handle, - github_handle=grant.github_handle, - linkedin_url=grant.linkedin_url, - mastodon_handle=grant.mastodon_handle, + participant=Participant.from_model(participant), ) diff --git a/backend/api/participants/types.py b/backend/api/participants/types.py index 25f63e06a9..df704c2620 100644 --- a/backend/api/participants/types.py +++ b/backend/api/participants/types.py @@ -12,7 +12,7 @@ class Participant: user_id: ID bio: str website: str - photo: str + photo: str | None photo_id: str | None public_profile: bool twitter_handle: str diff --git a/backend/grants/tests/factories.py b/backend/grants/tests/factories.py index 550cc71e96..b8870d5a39 100644 --- a/backend/grants/tests/factories.py +++ b/backend/grants/tests/factories.py @@ -6,6 +6,8 @@ from helpers.constants import GENDERS from users.tests.factories import UserFactory from countries import countries +from participants.tests.factories import ParticipantFactory +from participants.models import Participant class GrantFactory(DjangoModelFactory): @@ -34,3 +36,14 @@ class Meta: github_handle = factory.Faker("user_name") linkedin_url = factory.Faker("user_name") mastodon_handle = factory.Faker("user_name") + + @classmethod + def _create(self, model_class, *args, **kwargs): + grant = super()._create(model_class, *args, **kwargs) + + if not Participant.objects.filter( + user_id=grant.user.id, conference=grant.conference + ).exists(): + ParticipantFactory(user_id=grant.user.id, conference=grant.conference) + + return grant diff --git a/backend/participants/admin.py b/backend/participants/admin.py index bf47587d11..36448d4a65 100644 --- a/backend/participants/admin.py +++ b/backend/participants/admin.py @@ -29,6 +29,7 @@ class ParticipantAdmin(admin.ModelAdmin): form = ParticipantForm search_fields = ("user__email", "user__full_name") list_display = ( + "id", "user_display_name", "conference", ) diff --git a/frontend/src/components/grant-form/index.tsx b/frontend/src/components/grant-form/index.tsx index ffbea61222..cfe4ec938d 100644 --- a/frontend/src/components/grant-form/index.tsx +++ b/frontend/src/components/grant-form/index.tsx @@ -36,11 +36,15 @@ import { type UpdateGrantInput, type UpdateGrantMutation, useGrantDeadlineQuery, + useParticipantDataQuery, useSendGrantMutation, } from "~/types"; - import { ErrorsList } from "../errors-list"; import { createHref } from "../link"; +import { + type ParticipantFormFields, + PublicProfileCard, +} from "../public-profile-card"; import { AGE_GROUPS_OPTIONS, GENDER_OPTIONS, @@ -48,7 +52,7 @@ import { OCCUPATION_OPTIONS, } from "./options"; -export type GrantFormFields = { +export type GrantFormFields = ParticipantFormFields & { name: string; fullName: string; ageGroup: AgeGroup; @@ -64,11 +68,6 @@ export type GrantFormFields = { why: string; notes: string; travellingFrom: string; - website: string; - twitterHandle: string; - githubHandle: string; - linkedinUrl: string; - mastodonHandle: string; acceptedPrivacyPolicy: boolean; }; @@ -146,15 +145,15 @@ export const GrantForm = ({ const inputPlaceholderText = useTranslatedMessage("input.placeholder"); const { user, loading: loadingUser } = useCurrentUser({}); - const [formState, { text, textarea, select, checkbox }] = - useFormState( - { - needsFundsForTravel: "false", - }, - { - withIds: true, - }, - ); + const [formState, formOptions] = useFormState( + { + needsFundsForTravel: "false", + }, + { + withIds: true, + }, + ); + const { textarea, select, checkbox, text } = formOptions; const dateFormatter = new Intl.DateTimeFormat(language, { day: "numeric", @@ -202,11 +201,31 @@ export const GrantForm = ({ formState.setField("why", grant.why); formState.setField("notes", grant.notes); formState.setField("travellingFrom", grant.travellingFrom); - formState.setField("website", grant.website); - formState.setField("twitterHandle", grant.twitterHandle); - formState.setField("githubHandle", grant.githubHandle); - formState.setField("linkedinUrl", grant.linkedinUrl); - formState.setField("mastodonHandle", grant.mastodonHandle); + + if (grant.participant) { + formState.setField("participantBio", grant.participant.bio); + formState.setField("participantWebsite", grant.participant.website); + formState.setField( + "participantTwitterHandle", + grant.participant.twitterHandle, + ); + formState.setField( + "participantInstagramHandle", + grant.participant.instagramHandle, + ); + formState.setField( + "participantLinkedinUrl", + grant.participant.linkedinUrl, + ); + formState.setField( + "participantFacebookUrl", + grant.participant.facebookUrl, + ); + formState.setField( + "participantMastodonHandle", + grant.participant.mastodonHandle, + ); + } formState.setField("acceptedPrivacyPolicy", true); } }, [grant]); @@ -231,11 +250,13 @@ export const GrantForm = ({ communityContribution: formState.values.communityContribution, needVisa: formState.values.needVisa === "true", needAccommodation: formState.values.needAccommodation === "true", - website: formState.values.website, - twitterHandle: formState.values.twitterHandle, - githubHandle: formState.values.githubHandle, - linkedinUrl: formState.values.linkedinUrl, - mastodonHandle: formState.values.mastodonHandle, + participantWebsite: formState.values.participantWebsite, + participantBio: formState.values.participantBio, + participantTwitterHandle: formState.values.participantTwitterHandle, + participantInstagramHandle: formState.values.participantInstagramHandle, + participantLinkedinUrl: formState.values.participantLinkedinUrl, + participantFacebookUrl: formState.values.participantFacebookUrl, + participantMastodonHandle: formState.values.participantMastodonHandle, }); }, [formState.values], @@ -628,61 +649,23 @@ export const GrantForm = ({ placeholder={inputPlaceholderText} /> - - } - > - - - - } - > - - - - } - > - - - - } - > - - - - } - > - - + + + + getErrors( + `validationSpeaker${field[0].toUpperCase()}${field.substring(1)}` as any, + ) + } + showPhotoField={false} + /> + {!grant && ( <> diff --git a/frontend/src/components/grant-form/submit-grant.graphql b/frontend/src/components/grant-form/submit-grant.graphql index 366d36424a..4879e29ff6 100644 --- a/frontend/src/components/grant-form/submit-grant.graphql +++ b/frontend/src/components/grant-form/submit-grant.graphql @@ -24,11 +24,13 @@ mutation SendGrant($input: SendGrantInput!) { validationWhy: why validationNotes: notes validationTravellingFrom: travellingFrom - validationWebsite: website - validationTwitterHandle: twitterHandle - validationGithubHandle: githubHandle - validationLinkedinUrl: linkedinUrl - validationMastodonHandle: mastodonHandle + validationParticipantBio: participantBio + validationParticipantWebsite: participantWebsite + validationParticipantTwitterHandle: participantTwitterHandle + validationparticipantInstagramHandle: participantInstagramHandle + validationParticipantLinkedinUrl: participantLinkedinUrl + validationParticipantFacebookUrl: participantFacebookUrl + validationParticipantMastodonHandle: participantMastodonHandle nonFieldErrors } } diff --git a/frontend/src/components/public-profile-card/index.tsx b/frontend/src/components/public-profile-card/index.tsx index 6617c2dbdd..c02ce0d48e 100644 --- a/frontend/src/components/public-profile-card/index.tsx +++ b/frontend/src/components/public-profile-card/index.tsx @@ -6,6 +6,8 @@ import { Input, InputWrapper, MultiplePartsCard, + Spacer, + Text, Textarea, } from "@python-italia/pycon-styleguide"; import { FormattedMessage } from "react-intl"; @@ -28,13 +30,14 @@ export type ParticipantFormFields = { type Props = { formOptions: Inputs; - me: { + me?: { participant?: { photo?: string; }; }; getParticipantValidationError: (key: string) => string[] | null; photoRequired?: boolean; + showPhotoField?: boolean; }; export const PublicProfileCard = ({ @@ -42,6 +45,7 @@ export const PublicProfileCard = ({ formOptions: { raw, url, text }, getParticipantValidationError, photoRequired = false, + showPhotoField = true, }: Props) => { const inputPlaceholder = useTranslatedMessage("input.placeholder"); @@ -53,24 +57,33 @@ export const PublicProfileCard = ({ + + + + - - } - description={ - - } - > - - - + {showPhotoField && ( + + + } + description={ + + } + > + + + + )} + } diff --git a/frontend/src/components/schedule-view/types.ts b/frontend/src/components/schedule-view/types.ts index c480cbe58b..3c570d3080 100644 --- a/frontend/src/components/schedule-view/types.ts +++ b/frontend/src/components/schedule-view/types.ts @@ -25,7 +25,7 @@ export type Keynote = { }; type Participant = { - photo: string; + photo?: string; }; export type Item = { diff --git a/frontend/src/locale/index.ts b/frontend/src/locale/index.ts index 207519644e..da00221ef5 100644 --- a/frontend/src/locale/index.ts +++ b/frontend/src/locale/index.ts @@ -568,6 +568,8 @@ Failing to notify us may impact your eligibility for financial aid at future eve "profile.edit.success": "Profile updated!", "profile.publicProfile.heading": "Your public profile", + "profile.publicProfile.description": + "This is your public profile. It may appear as part of your speaker profile or be visible when someone scans your badge QR code. Please avoid adding private information or anything you don’t want to be publicly accessible.", "tickets.checkout.title": "Checkout", "tickets.title": "Buy Tickets", @@ -2086,6 +2088,8 @@ Usa il pulsante 'Gestisci' nella pagina per confermare o rifiutare il grant. Hai "profile.edit.success": "Profilo aggiornato!", "profile.publicProfile.heading": "Profilo pubblico", + "profile.publicProfile.description": + "Questo è il tuo profilo pubblico. Potrebbe essere visibile come parte del tuo profilo speaker o quando qualcuno scansiona il codice QR del tuo badge. Ti invitiamo a non inserire informazioni private o dati che non vuoi rendere pubblici.", "profile.publicProfile.yourPhoto": "La tua foto", "profile.publicProfile.yourPhoto.description": diff --git a/frontend/src/pages/grants/edit/index.tsx b/frontend/src/pages/grants/edit/index.tsx index 5fdda444e9..21e04d4a17 100644 --- a/frontend/src/pages/grants/edit/index.tsx +++ b/frontend/src/pages/grants/edit/index.tsx @@ -11,6 +11,7 @@ import { queryCurrentUser, queryGrantDeadline, queryMyGrant, + queryParticipantData, useMyGrantQuery, useUpdateGrantMutation, } from "~/types"; @@ -23,7 +24,6 @@ const GrantPage = (): JSX.Element => { variables: { conference: code, }, - skip: typeof window === "undefined", }); const grant = data?.me?.grant; diff --git a/frontend/src/pages/grants/edit/my-grant.graphql b/frontend/src/pages/grants/edit/my-grant.graphql index 30f4372194..1ae4a763df 100644 --- a/frontend/src/pages/grants/edit/my-grant.graphql +++ b/frontend/src/pages/grants/edit/my-grant.graphql @@ -20,11 +20,24 @@ query MyGrant($conference: String!) { why notes travellingFrom + + + + participant { + id + photo + bio website twitterHandle - githubHandle + instagramHandle linkedinUrl + facebookUrl mastodonHandle + + fullname + publicProfile + userId + } } } } diff --git a/frontend/src/pages/grants/edit/update-grant.graphql b/frontend/src/pages/grants/edit/update-grant.graphql index 1dced20c94..96c75c440d 100644 --- a/frontend/src/pages/grants/edit/update-grant.graphql +++ b/frontend/src/pages/grants/edit/update-grant.graphql @@ -17,11 +17,6 @@ mutation UpdateGrant($input: UpdateGrantInput!) { needVisa notes travellingFrom - website - twitterHandle - githubHandle - linkedinUrl - mastodonHandle } ... on GrantErrors { @@ -42,11 +37,13 @@ mutation UpdateGrant($input: UpdateGrantInput!) { validationWhy: why validationNotes: notes validationTravellingFrom: travellingFrom - validationWebsite: website - validationTwitterHandle: twitterHandle - validationGithubHandle: githubHandle - validationLinkedinUrl: linkedinUrl - validationMastodonHandle: mastodonHandle + validationParticipantBio: participantBio + validationParticipantWebsite: participantWebsite + validationParticipantTwitterHandle: participantTwitterHandle + validationparticipantInstagramHandle: participantInstagramHandle + validationParticipantLinkedinUrl: participantLinkedinUrl + validationParticipantFacebookUrl: participantFacebookUrl + validationParticipantMastodonHandle: participantMastodonHandle nonFieldErrors } } diff --git a/frontend/src/pages/grants/index.tsx b/frontend/src/pages/grants/index.tsx index cb1a6c6980..98917af377 100644 --- a/frontend/src/pages/grants/index.tsx +++ b/frontend/src/pages/grants/index.tsx @@ -15,6 +15,7 @@ import { queryCurrentUser, queryGrantDeadline, queryMyGrant, + queryParticipantData, useGrantDeadlineQuery, } from "~/types"; diff --git a/frontend/src/pages/profile/my-grant.tsx b/frontend/src/pages/profile/my-grant.tsx index 9886d8d3cb..c49a7816d8 100644 --- a/frontend/src/pages/profile/my-grant.tsx +++ b/frontend/src/pages/profile/my-grant.tsx @@ -2,7 +2,11 @@ import type { GetServerSideProps } from "next"; import { addApolloState, getApolloClient } from "~/apollo/client"; import { prefetchSharedQueries } from "~/helpers/prefetch"; -import { queryCountries, queryMyProfileWithGrant } from "~/types"; +import { + queryCountries, + queryMyProfileWithGrant, + queryParticipantData, +} from "~/types"; export const getServerSideProps: GetServerSideProps = async ({ req, @@ -27,6 +31,9 @@ export const getServerSideProps: GetServerSideProps = async ({ queryMyProfileWithGrant(client, { conference: process.env.conferenceCode, }), + queryParticipantData(client, { + conference: process.env.conferenceCode, + }), ]); } catch (e) { return {