mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature] fix sonarlint issues
This commit is contained in:
@@ -67,7 +67,7 @@ export class InstallationLocationService {
|
||||
}
|
||||
|
||||
if(this.staticConfig.has(this.STORE_INSTALLATION_PATH_KEY)) {
|
||||
return this.staticConfig.get(this.STORE_INSTALLATION_PATH_KEY) as string;
|
||||
return this.staticConfig.get(this.STORE_INSTALLATION_PATH_KEY);
|
||||
}
|
||||
|
||||
const { result: oldPath } = tryit(() => path.join(app.getPath("documents"), this.INSTALLATION_FOLDER));
|
||||
|
||||
@@ -4,14 +4,14 @@ type Item = {
|
||||
text: string;
|
||||
desc?: string;
|
||||
checked?: boolean;
|
||||
onChange?: (isChecked: boolean) => void;
|
||||
onChange?: (isChecked: boolean) => void|Promise<void>;
|
||||
};
|
||||
|
||||
type Props = {
|
||||
items: Item[];
|
||||
};
|
||||
|
||||
export function SettingToogleSwitchGrid({ items }: Props) {
|
||||
export function SettingToogleSwitchGrid({ items }: Readonly<Props>) {
|
||||
|
||||
const handleItemChange = (item: Item, state: boolean) => {
|
||||
item.onChange?.(state);
|
||||
|
||||
@@ -17,7 +17,7 @@ type Props = {
|
||||
onChange?: (isChecked: boolean) => void;
|
||||
}
|
||||
|
||||
export function ToogleSwitch({ checked, className, classNames, bgColor, onChange }: Props) {
|
||||
export function ToogleSwitch({ checked, className, classNames, bgColor, onChange }: Readonly<Props>) {
|
||||
|
||||
const uuid = useConstant(() => crypto.randomUUID());
|
||||
const { firstColor } = useThemeColor();
|
||||
|
||||
Reference in New Issue
Block a user