siteRes: GetSiteResponse;
customEmojis: CustomEmojiViewForm[];
loading: boolean;
- page: bigint;
+ page: number;
}
interface CustomEmojiViewForm {
alt_text: string;
keywords: string;
changed: boolean;
- page: bigint;
+ page: number;
}
export class EmojiForm extends Component<any, EmojiFormState> {
alt_text: x.custom_emoji.alt_text,
keywords: x.keywords.map(x => x.keyword).join(" "),
changed: false,
- page: BigInt(1 + Math.floor(index / this.itemsPerPage)),
+ page: 1 + Math.floor(index / this.itemsPerPage),
})),
- page: 1n,
+ page: 1,
};
state: EmojiFormState;
private scrollRef: any = {};
<tbody>
{this.state.customEmojis
.slice(
- Number((this.state.page - 1n) * BigInt(this.itemsPerPage)),
+ Number((this.state.page - 1) * this.itemsPerPage),
Number(
- (this.state.page - 1n) * BigInt(this.itemsPerPage) +
- BigInt(this.itemsPerPage)
+ (this.state.page - 1) * this.itemsPerPage +
+ this.itemsPerPage
)
)
.map((cv, index) => (
else return i18n.t("custom_emoji_save_validation");
}
- handlePageChange(page: bigint) {
+ handlePageChange(page: number) {
this.setState({ page: page });
}
) {
let custom_emojis = [...props.form.state.customEmojis];
let pagedIndex =
- (props.form.state.page - 1n) * BigInt(props.form.itemsPerPage) +
- BigInt(props.index);
+ (props.form.state.page - 1) * props.form.itemsPerPage + props.index;
let item = {
- ...props.form.state.customEmojis[Number(pagedIndex)],
+ ...props.form.state.customEmojis[pagedIndex],
category: event.target.value,
changed: true,
};
) {
let custom_emojis = [...props.form.state.customEmojis];
let pagedIndex =
- (props.form.state.page - 1n) * BigInt(props.form.itemsPerPage) +
- BigInt(props.index);
+ (props.form.state.page - 1) * props.form.itemsPerPage + props.index;
let item = {
- ...props.form.state.customEmojis[Number(pagedIndex)],
+ ...props.form.state.customEmojis[pagedIndex],
shortcode: event.target.value,
changed: true,
};
) {
let custom_emojis = [...props.form.state.customEmojis];
let pagedIndex =
- (props.form.state.page - 1n) * BigInt(props.form.itemsPerPage) +
- BigInt(props.index);
+ (props.form.state.page - 1) * props.form.itemsPerPage + props.index;
let item = {
- ...props.form.state.customEmojis[Number(pagedIndex)],
+ ...props.form.state.customEmojis[pagedIndex],
image_url: props.overrideValue ?? event.target.value,
changed: true,
};
) {
let custom_emojis = [...props.form.state.customEmojis];
let pagedIndex =
- (props.form.state.page - 1n) * BigInt(props.form.itemsPerPage) +
- BigInt(props.index);
+ (props.form.state.page - 1) * props.form.itemsPerPage + props.index;
let item = {
- ...props.form.state.customEmojis[Number(pagedIndex)],
+ ...props.form.state.customEmojis[pagedIndex],
alt_text: event.target.value,
changed: true,
};
) {
let custom_emojis = [...props.form.state.customEmojis];
let pagedIndex =
- (props.form.state.page - 1n) * BigInt(props.form.itemsPerPage) +
- BigInt(props.index);
+ (props.form.state.page - 1) * props.form.itemsPerPage + props.index;
let item = {
- ...props.form.state.customEmojis[Number(pagedIndex)],
+ ...props.form.state.customEmojis[pagedIndex],
keywords: event.target.value,
changed: true,
};
cv: CustomEmojiViewForm;
}) {
let pagedIndex =
- (props.form.state.page - 1n) * BigInt(props.form.itemsPerPage) +
- BigInt(props.index);
+ (props.form.state.page - 1) * props.form.itemsPerPage + props.index;
if (props.cv.id != 0) {
const deleteForm: DeleteCustomEmoji = {
id: props.cv.id,
handleAddEmojiClick(form: EmojiForm, event: any) {
event.preventDefault();
let custom_emojis = [...form.state.customEmojis];
- const page = BigInt(
- 1 + Math.floor(form.state.customEmojis.length / form.itemsPerPage)
- );
+ const page =
+ 1 + Math.floor(form.state.customEmojis.length / form.itemsPerPage);
let item: CustomEmojiViewForm = {
id: 0,
shortcode: "",