Skip to content

Commit 7ba528f

Browse files
committed
Use InlineSpinner instead of a loading text.
1 parent 001b1d1 commit 7ba528f

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/components/views/room_settings/UrlPreviewSettings.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Please see LICENSE files in the repository root for full details.
1111

1212
import React, { ReactNode, JSX } from "react";
1313
import { Room } from "matrix-js-sdk/src/matrix";
14+
import { InlineSpinner } from "@vector-im/compound-web";
1415

1516
import { _t } from "../../../languageHandler";
1617
import SettingsStore from "../../../settings/SettingsStore";
@@ -46,7 +47,7 @@ export function UrlPreviewSettings({ room }: UrlPreviewSettingsProps): JSX.Eleme
4647
description={!isLoading && <Description isEncrypted={isEncrypted} />}
4748
>
4849
{isLoading ? (
49-
_t("common|loading")
50+
<InlineSpinner />
5051
) : (
5152
<>
5253
<PreviewsForRoom isEncrypted={isEncrypted} roomId={roomId} />

test/unit-tests/components/views/room_settings/__snapshots__/UrlPreviewSettings-test.tsx.snap

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,21 @@ exports[`UrlPreviewSettings should display the correct preview when the setting
215215
<div
216216
class="mx_SettingsFieldset_content"
217217
>
218-
Loading…
218+
<svg
219+
class="_icon_1ye7b_27"
220+
fill="currentColor"
221+
height="1em"
222+
style="width: 20px; height: 20px;"
223+
viewBox="0 0 24 24"
224+
width="1em"
225+
xmlns="http://www.w3.org/2000/svg"
226+
>
227+
<path
228+
clip-rule="evenodd"
229+
d="M12 4.031a8 8 0 1 0 8 8 1 1 0 0 1 2 0c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10a1 1 0 1 1 0 2Z"
230+
fill-rule="evenodd"
231+
/>
232+
</svg>
219233
</div>
220234
</fieldset>
221235
</DocumentFragment>

0 commit comments

Comments
 (0)