Fix logs component states

Also just display text when sending which makes the button jump around
a bit but avoids hardcoding the width
This commit is contained in:
David Baker
2023-07-24 21:33:13 +01:00
parent 9fdafaf395
commit 8e6380db0b
2 changed files with 3 additions and 4 deletions

View File

@@ -40,14 +40,14 @@ export const RageshakeButton = ({ description }: Props) => {
if (!Config.get().rageshake?.submit_url) return null;
let logsComponent: JSX.Element | null = null;
if (sent) {
if (sending) {
logsComponent = <span>{t("Sending…")}</span>;
} else if (sent) {
logsComponent = <div>{t("Thanks!")}</div>;
} else {
let caption = t("Send debug logs");
if (error) {
caption = t("Retry sending logs");
} else if (sending) {
logsComponent = <span>{t("Sending…")}</span>;
}
logsComponent = (