From 7ba528f7a530e82308f4afc1967d0073880da33b Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 20 Nov 2024 17:44:49 +0100 Subject: [PATCH] Use `InlineSpinner` instead of a loading text. --- .../views/room_settings/UrlPreviewSettings.tsx | 3 ++- .../UrlPreviewSettings-test.tsx.snap | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/views/room_settings/UrlPreviewSettings.tsx b/src/components/views/room_settings/UrlPreviewSettings.tsx index 3690f602abd..4ca63fd4a0d 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.tsx +++ b/src/components/views/room_settings/UrlPreviewSettings.tsx @@ -11,6 +11,7 @@ Please see LICENSE files in the repository root for full details. import React, { ReactNode, JSX } from "react"; import { Room } from "matrix-js-sdk/src/matrix"; +import { InlineSpinner } from "@vector-im/compound-web"; import { _t } from "../../../languageHandler"; import SettingsStore from "../../../settings/SettingsStore"; @@ -46,7 +47,7 @@ export function UrlPreviewSettings({ room }: UrlPreviewSettingsProps): JSX.Eleme description={!isLoading && } > {isLoading ? ( - _t("common|loading") + ) : ( <> diff --git a/test/unit-tests/components/views/room_settings/__snapshots__/UrlPreviewSettings-test.tsx.snap b/test/unit-tests/components/views/room_settings/__snapshots__/UrlPreviewSettings-test.tsx.snap index f9b10357ee2..d3a7eb4ad4c 100644 --- a/test/unit-tests/components/views/room_settings/__snapshots__/UrlPreviewSettings-test.tsx.snap +++ b/test/unit-tests/components/views/room_settings/__snapshots__/UrlPreviewSettings-test.tsx.snap @@ -215,7 +215,21 @@ exports[`UrlPreviewSettings should display the correct preview when the setting
- Loading… + + +