Skip to content

Commit

Permalink
Fix load error
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikMelton committed Nov 9, 2024
1 parent 0b7e060 commit 752b0de
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/components/funnels/funnels/register/steps/roomshare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import RoomShareCreate from '~/components/funnels/funnels/register/steps/roomsha

const RoomShare = (_: ReadonlyRouteComponentProps) =>
<Router basepath={withPrefix('/register/room-share')}>
<RoomShareHome path={`/${ROUTES.REGISTER_ROOM_SHARE_HOME}`} />
<RoomShareCreate path={`/${ROUTES.REGISTER_ROOM_SHARE_CREATE}`} />`
<RoomShareJoin path={`/${ROUTES.REGISTER_ROOM_SHARE_JOIN}`} />
</Router>

export default RoomShare
2 changes: 2 additions & 0 deletions src/components/funnels/funnels/register/steps/summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ const Summary = (_: ReadonlyRouteComponentProps) => {
return <WithInvoiceRegisterFunnelLayout onNext={handleSubmit} currentStep={5}>
<Localized id={`register-summary-title-${isEdit ? 'edit' : 'initial'}`}><h3>Your registration</h3></Localized>

{config.enableRoomshare ? <Localized id="register-summary-roomshare"><Link to="/room-share">Room share</Link></Localized> : undefined}

<Localized id="register-summary-registration-status" vars={{ status }}>
<StatusText status={status}>We have received your registration and will confirm it when things are ready. Keep an eye on your mailbox!</StatusText>
</Localized>
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const config = checkConfig({
dayTicketEndDate: DateTime.fromISO('2024-09-21', { zone: 'Europe/Berlin' }),
earliestBirthDate: DateTime.fromISO('1901-01-01'),
minimumAge: 18,
enableRoomshare: true, // For development
enableRoomshare: true, // TODO: For development

Check warning on line 28 in src/config.ts

View workflow job for this annotation

GitHub Actions / build-and-test

Unexpected 'todo' comment: 'TODO: For development'
allowedCountries: ['AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AC', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BQ', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'CV', 'KH', 'CM', 'CA', 'KY', 'CF', 'EA', 'TD', 'CL', 'CN', 'CX', 'CP', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'HR', 'CU', 'CW', 'CY', 'CZ', 'CI', 'DK', 'DG', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'SZ', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'IC', 'KZ', 'KE', 'KI', 'KP', 'KR', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MK', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'BL', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'SS', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TA', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM', 'US', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW'],
ticketLevels: {
'standard': {
Expand Down
16 changes: 11 additions & 5 deletions src/navigation/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,21 @@ import { withPrefix } from 'gatsby'
import { useAppSelector } from '~/hooks/redux'
import { isEditMode } from '~/state/selectors/register'
import config from '~/config'

Check failure on line 19 in src/navigation/router.tsx

View workflow job for this annotation

GitHub Actions / build-and-test

'config' is defined but never used
import RoomShareHome from '~/components/funnels/funnels/register/steps/roomshare/home'
import RoomShareCreate from '~/components/funnels/funnels/register/steps/roomshare/create'
import RoomShareJoin from '~/components/funnels/funnels/register/steps/roomshare/join'

export const EFRouter = () =>
<IndexPage />

const RoomShareRoutes = () =>
<RoomShare path={`/${ROUTES.REGISTER_ROOM_SHARE}`} />

export const RegisterRouter = () => {
const isEdit = useAppSelector(isEditMode())
const enableRoomShare = config.enableRoomshare

return <Router basepath={withPrefix('/register')}>
<Ticket default={!isEdit} path={`/${ROUTES.REGISTER_TICKET}/*`} />
<Personal path={`/${ROUTES.REGISTER_PERSONAL}`} />
<Contact path={`/${ROUTES.REGISTER_CONTACT}`} />
<Optional path={`/${ROUTES.REGISTER_OPTIONAL}`} />
{enableRoomShare && <RoomShareRoutes />}
<Summary default={isEdit} path={`/${ROUTES.REGISTER_SUMMARY}`} />
<ThankYou path={`/${ROUTES.REGISTER_THANK_YOU}`} />
</Router>
Expand All @@ -46,3 +44,11 @@ export const HotelBookingRouter = () =>
<AdditionalInfo path={ROUTES.HOTEL_BOOKING_ADDITIONAL_INFO} />
<Email path={ROUTES.HOTEL_BOOKING_EMAIL} />
</Router>

export const RoomShareRouter = () => {
return <Router basepath={withPrefix('/room-share')}>
<RoomShareHome default path={`/${ROUTES.REGISTER_ROOM_SHARE_HOME}`} />
<RoomShareCreate path={`/${ROUTES.REGISTER_ROOM_SHARE_CREATE}`} />`
<RoomShareJoin path={`/${ROUTES.REGISTER_ROOM_SHARE_JOIN}`} />
</Router>
}
14 changes: 14 additions & 0 deletions src/pages/room-sharing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { RoomShareRouter } from '~/navigation/router'

import SEO from '~/components/seo'
import { ReadonlyRouteComponentProps } from '~/util/readonly-types'
import Layout from '~/components/layout'
import config from '~/config'

export const Head = () => <SEO title="Room Sharing" />

const RoomSharingPage = (_: ReadonlyRouteComponentProps) => <Layout deadline={config.hotelBookingLaunch}>
{RoomShareRouter()}
</Layout>

export default RoomSharingPage

0 comments on commit 752b0de

Please sign in to comment.