pl-fe: remove some any
s
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
a44dd71be8
commit
59f4138f4f
8 changed files with 7 additions and 8 deletions
|
@ -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 = '/');
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ const SelectedStatus = ({ statusId }: { statusId: string }) => {
|
|||
return (
|
||||
<Stack space={2} className='rounded-lg bg-gray-100 p-4 dark:bg-gray-800'>
|
||||
<AccountContainer
|
||||
id={status.account as any}
|
||||
id={status.account?.id}
|
||||
showAccountHoverCard={false}
|
||||
withLinkToProfile={false}
|
||||
timestamp={status.created_at}
|
||||
|
|
|
@ -147,7 +147,6 @@ const normalizeStatus = (status: BaseStatus & {
|
|||
media_attachments,
|
||||
...calculated,
|
||||
translation: (status.translation || calculated.translation || null) as Translation | null | false,
|
||||
// quote: status.quote ? normalizeStatus(status.quote as any) : null,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue