Skip to content

Commit

Permalink
Bump typescript from 3.9.3 to 4.2.4 (#1320)
Browse files Browse the repository at this point in the history
* bump typescript from 3.9.3 to 4.2.4
* fix typing + bug in legacy Playa component
* fix typing in VenueEntrancePage
  • Loading branch information
0xdevalias authored Apr 14, 2021
1 parent bc96111 commit d24f784
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"gifwrap": "^0.9.2",
"phin": "^3.5.0",
"ts-node": "^9.1.1",
"typescript": "^3.9.3",
"typescript": "^4.2.4",
"uuidv4": "^6.2.3"
}
}
8 changes: 4 additions & 4 deletions src/components/templates/Playa/Playa.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ const Playa = () => {
return Math.hypot(venuePlacement.x - x, venuePlacement.y - y);
};

const { camp } = useParams();
const { camp } = useParams<{ camp?: string }>();
useEffect(() => {
if (camp) {
const campVenue = venues?.find((venue) => venue.id === camp);
if (campVenue && !PLAYA_TEMPLATES.includes(campVenue.template)) {
if (camp.placement) {
setCenterX(camp.placement.x);
setCenterY(camp.placement.y);
if (campVenue.placement !== undefined) {
setCenterX(campVenue.placement.x);
setCenterY(campVenue.placement.y);
}
showVenue(campVenue);
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/VenueEntrancePage/VenueEntrancePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { showZendeskWidget } from "utils/zendesk";
export const VenueEntrancePage: React.FunctionComponent<{}> = () => {
const { user, profile } = useUser();
const history = useHistory();
const { step } = useParams();
const { step } = useParams<{ step?: string }>();
const venueId = useVenueId();
useConnectCurrentVenue();
const venue = useSelector(currentVenueSelectorData);
Expand All @@ -32,6 +32,7 @@ export const VenueEntrancePage: React.FunctionComponent<{}> = () => {
}

if (
step === undefined ||
!(parseInt(step) > 0) ||
!venue.entrance ||
!venue.entrance.length ||
Expand Down

0 comments on commit d24f784

Please sign in to comment.