Feature/batch chapter actions (#194)

* Add batch delete chapters

* Add remaining batch actions
This commit is contained in:
Valter Martinek
2022-11-21 01:33:21 +01:00
committed by GitHub
parent 1510c5a093
commit 68f67273aa
5 changed files with 180 additions and 37 deletions

View File

@@ -12,3 +12,8 @@ export const pluralize = (count: number, input: string | { one: string, many: st
}
return input[count === 1 ? 'one' : 'many'];
};
export const interpolate = (count: number, input: { one: string, many: string }) => {
const text = count === 1 ? input.one : input.many;
return text.replaceAll('%count%', count.toString());
};