Skip to content

Commit

Permalink
Work around objects-in-children nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
nbudin committed Mar 15, 2023
1 parent 94ca1e5 commit 6c6f702
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/javascript/EventsApp/EventPage/EventPageRunCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import {
useWithdrawSignupRequestMutation,
} from './mutations.generated';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TI = any;

function updateCacheAfterSignup(
cache: ApolloCache<unknown>,
event: EventPageQueryData['convention']['event'],
Expand Down Expand Up @@ -123,7 +126,7 @@ function EventPageRunCard({ event, run, myProfile, currentAbility }: EventPageRu
</strong>{' '}
If the request is accepted, you’ll automatically be withdrawn from this event.
</p>
<p className="mb-0">Are you sure you want to withdraw from {{ eventTitle: event.title }}?</p>
<p className="mb-0">Are you sure you want to withdraw from {{ eventTitle: event.title } as TI}?</p>
</Trans>
),
action: () => withdrawMySignupMutate({ variables: { runId: run.id } }),
Expand Down
5 changes: 4 additions & 1 deletion app/javascript/EventsApp/ScheduleGrid/AvailabilityUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { Trans } from 'react-i18next';
import SignupCountData from '../SignupCountData';
import { ScheduleEvent } from './Schedule';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TI = any;

export type ScheduleEventAvailability = {
totalSlots: number;
signupCount: number;
Expand Down Expand Up @@ -44,7 +47,7 @@ export function describeAvailability(event: ScheduleEvent, signupCountData: Sign
<strong>Full</strong>
<span className="text-muted">
{' ('}
{{ count: event.registration_policy?.total_slots ?? 0 }}
{{ count: event.registration_policy?.total_slots ?? 0 } as TI}
{' slots)'}
</span>
</Trans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Trans, useTranslation } from 'react-i18next';
import { Convention, Event, TicketType, UserConProfile } from '../../graphqlTypes.generated';
import humanize from '../../humanize';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TI = any;

export type TicketingStatusDescriptionProps = {
userConProfile: Pick<UserConProfile, 'name_without_nickname'> & {
ticket?: null | {
Expand Down Expand Up @@ -55,7 +58,7 @@ function TicketingStatusDescription({ userConProfile, convention }: TicketingSta
{{ name: userConProfile.name_without_nickname }}
<span className="text-danger">
{' '}
has no {{ ticketName }} for {{ conventionName: convention.name }}.
has no {{ ticketName } as TI} for {{ conventionName: convention.name } as TI}.
</span>{' '}
Without a {{ ticketName }}, users cannot sign up for events at the convention.
</Trans>
Expand Down
5 changes: 4 additions & 1 deletion app/javascript/FourOhFourPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useLocation } from 'react-router-dom';
import { Trans } from 'react-i18next';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TI = any;

export default function FourOhFourPage(): JSX.Element {
const location = useLocation();

Expand All @@ -9,7 +12,7 @@ export default function FourOhFourPage(): JSX.Element {
<Trans i18nKey="errors.404">
<h1>Oops!</h1>

<p className="mb-0">We couldn’t find a page at the location {{ pathname: location.pathname }}.</p>
<p className="mb-0">We couldn’t find a page at the location {{ pathname: location.pathname } as TI}.</p>
</Trans>
</div>
);
Expand Down

0 comments on commit 6c6f702

Please sign in to comment.