diff --git a/packages/pl-fe/src/actions/external-auth.ts b/packages/pl-fe/src/actions/external-auth.ts index da6f01687..550d445c5 100644 --- a/packages/pl-fe/src/actions/external-auth.ts +++ b/packages/pl-fe/src/actions/external-auth.ts @@ -90,7 +90,7 @@ const loginWithCode = (code: string) => return dispatch(obtainOAuthToken(params, baseURL)) .then((token) => dispatch(authLoggedIn(token))) - .then(({ access_token }) => dispatch(verifyCredentials(access_token as string, baseURL))) + .then(({ access_token }) => dispatch(verifyCredentials(access_token, baseURL))) .then((account) => dispatch(switchAccount(account.id))) .then(() => window.location.href = '/'); }; diff --git a/packages/pl-fe/src/features/audio/visualizer.ts b/packages/pl-fe/src/features/audio/visualizer.ts index 8e446a8d0..1ca613156 100644 --- a/packages/pl-fe/src/features/audio/visualizer.ts +++ b/packages/pl-fe/src/features/audio/visualizer.ts @@ -129,7 +129,7 @@ class Visualizer { draw(cx: number, cy: number, color: string, radius: number, coefficient: number) { this.context!.save(); - const ticks = this.getTicks(parseInt(360 * coefficient as any), this.tickSize, radius, coefficient); + const ticks = this.getTicks(parseInt(String(360 * coefficient)), this.tickSize, radius, coefficient); ticks.forEach(tick => { this.drawTick(cx, cy, color, tick.x1, tick.y1, tick.x2, tick.y2); diff --git a/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx b/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx index a5f6eaa48..be2008979 100644 --- a/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/avatar-selection-step.tsx @@ -59,7 +59,7 @@ const AvatarSelectionStep = ({ onNext }: { onNext: () => void }) => { setSelectedFile(null); if (error.response?.status === 422) { - toast.error((error.response.json as any).error.replace('Validation failed: ', '')); + toast.error(error.response.json.error.replace('Validation failed: ', '')); } else { toast.error(messages.error); } diff --git a/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx b/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx index a7be47565..7b87abffa 100644 --- a/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/bio-step.tsx @@ -40,7 +40,7 @@ const BioStep = ({ onNext }: { onNext: () => void }) => { setSubmitting(false); if (error.response?.status === 422) { - setErrors([(error.response.json as any).error.replace('Validation failed: ', '')]); + setErrors([error.response.json.error.replace('Validation failed: ', '')]); } else { toast.error(messages.error); } diff --git a/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx b/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx index 4273ffd05..55232eca9 100644 --- a/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/cover-photo-selection-step.tsx @@ -63,7 +63,7 @@ const CoverPhotoSelectionStep = ({ onNext }: { onNext: () => void }) => { setSelectedFile(null); if (error.response?.status === 422) { - toast.error((error.response.json as any).error.replace('Validation failed: ', '')); + toast.error(error.response.json.error.replace('Validation failed: ', '')); } else { toast.error(messages.error); } diff --git a/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx b/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx index e795fa4bf..742941166 100644 --- a/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx +++ b/packages/pl-fe/src/features/onboarding/steps/display-name-step.tsx @@ -51,7 +51,7 @@ const DisplayNameStep = ({ onNext }: { onNext: () => void }) => { setSubmitting(false); if (error.response?.status === 422) { - setErrors([(error.response.json as any).error.replace('Validation failed: ', '')]); + setErrors([error.response.json.error.replace('Validation failed: ', '')]); } else { toast.error(messages.error); } diff --git a/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx b/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx index 926f0c05e..4d41a0581 100644 --- a/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx +++ b/packages/pl-fe/src/features/ui/components/modals/report-modal/index.tsx @@ -53,7 +53,7 @@ const SelectedStatus = ({ statusId }: { statusId: string }) => { return (