mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
applied various optimisations to UI
This commit is contained in:
@@ -2,7 +2,6 @@ import { ChangeEvent, memo, useEffect, useState } from "react";
|
||||
import { downloadPresetBackground, openDB, readAllData, writeData } from "../hooks/BackgroundDataLoader";
|
||||
import presetBackgrounds from "../assets/presetBackgrounds";
|
||||
import "./BackgroundSelector.css";
|
||||
import browser from "webextension-polyfill";
|
||||
|
||||
export interface Background {
|
||||
id: string;
|
||||
|
||||
@@ -14,7 +14,7 @@ type ThemeCoverProps = {
|
||||
onThemeDelete: (themeId: string) => void;
|
||||
};
|
||||
|
||||
export const ThemeCover: React.FC<ThemeCoverProps> = ({
|
||||
export const ThemeCover: React.FC<ThemeCoverProps> = React.memo(({
|
||||
theme,
|
||||
downloaded,
|
||||
isSelected,
|
||||
@@ -96,7 +96,7 @@ export const ThemeCover: React.FC<ThemeCoverProps> = ({
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
const LoadingSpinner = ({ size }: { size: number }) => {
|
||||
return <div style={{ width: `${size}px`, height: `${size}px` }} className={`animate-spin rounded-full border-2 border-white border-t-2 border-t-transparent`}></div>;
|
||||
|
||||
Reference in New Issue
Block a user