mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Add success message
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
4c1168aaf7
commit
6cad89b20c
@ -30,7 +30,7 @@ interface Props {
|
||||
|
||||
export function FeedbackSettingsTab({ roomId }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const { submitRageshake, sending, error } = useSubmitRageshake();
|
||||
const { submitRageshake, sending, sent, error } = useSubmitRageshake();
|
||||
const sendRageshakeRequest = useRageshakeRequest();
|
||||
|
||||
const onSubmitFeedback = useCallback(
|
||||
@ -72,27 +72,30 @@ export function FeedbackSettingsTab({ roomId }: Props) {
|
||||
name="description"
|
||||
label={t("Your feedback")}
|
||||
type="textarea"
|
||||
disabled={sending || sent}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="sendLogs"
|
||||
name="sendLogs"
|
||||
label={t("Include debug logs")}
|
||||
type="checkbox"
|
||||
defaultChecked
|
||||
/>
|
||||
</FieldRow>
|
||||
{error && (
|
||||
{sent ? (
|
||||
<Body> {t("Thanks, we received your feedback!")}</Body>
|
||||
) : (
|
||||
<FieldRow>
|
||||
<ErrorMessage error={error} />
|
||||
<InputField
|
||||
id="sendLogs"
|
||||
name="sendLogs"
|
||||
label={t("Include debug logs")}
|
||||
type="checkbox"
|
||||
defaultChecked
|
||||
/>
|
||||
{error && (
|
||||
<FieldRow>
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<Button type="submit" disabled={sending}>
|
||||
{sending ? t("Submitting…") : t("Submit")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
)}
|
||||
<FieldRow>
|
||||
<Button type="submit" disabled={sending}>
|
||||
{sending ? t("Submitting…") : t("Submit")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user