Move more funcs to shared lib

This commit is contained in:
Ajay
2023-05-09 22:12:15 -04:00
parent 33d098d78a
commit 92fabdf37a
7 changed files with 18 additions and 41 deletions

View File

@@ -7,8 +7,8 @@ import ThumbsDownSvg from "../svg-icons/thumbs_down_svg";
import { downvoteButtonColor, SkipNoticeAction } from "../utils/noticeUtils";
import { VoteResponse } from "../messageTypes";
import { AnimationUtils } from "../utils/animationUtils";
import { GenericUtils } from "../utils/genericUtils";
import { Tooltip } from "../render/Tooltip";
import { getErrorMessage } from "@ajayyy/maze-utils/lib/formating";
export interface ChapterVoteProps {
vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>;
@@ -124,7 +124,7 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
show: type === 1
});
} else if (response.statusCode !== 403) {
alert(GenericUtils.getErrorMessage(response.statusCode, response.responseText));
alert(getErrorMessage(response.statusCode, response.responseText));
}
}
}