remove console logs and useless stuff

This commit is contained in:
MathieuG-P
2022-12-27 00:11:29 +01:00
parent 4cb9482e27
commit a1aeab1d90
9 changed files with 2 additions and 19 deletions
-2
View File
@@ -79,7 +79,6 @@ ipcMain.on("download-map", async (event, request: IpcRequest<{map: BsvMapDetail,
maps.downloadMap(request.args.map, request.args.version).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(err => {
console.log(err);
utils.ipcSend(request.responceChannel, {success: false, error: err});
});
});
@@ -91,7 +90,6 @@ ipcMain.on("one-click-install-map", async (event, request: IpcRequest<BsvMapDeta
maps.oneClickDownloadMap(request.args).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(err => {
console.log(err);
utils.ipcSend(request.responceChannel, {success: false, error: err});
});
});
-1
View File
@@ -11,7 +11,6 @@ ipcMain.on("one-click-install-playlist", async (event, request: IpcRequest<strin
playlists.oneClickInstallPlaylist(request.args).then(() => {
utils.ipcSend(request.responceChannel, {success: true});
}).catch(e => {
console.log(e);
utils.ipcSend(request.responceChannel, {success: false, error: e});
});
});
@@ -101,16 +101,12 @@ export class BeatSaverApiService {
public async searchMaps(search: SearchParams): Promise<ApiResult<SearchResponse>>{
console.log(search);
const url = new URL(`${this.bsaverApiUrl}/search/text/${search?.page ?? 0}`);
url.search = this.searchParamsToUrlParams(search).toString();
const res = await fetch(url.toString());
console.log(res);
if(!res.ok){
return {status: res.status, data: null};
}
@@ -59,7 +59,6 @@ export class BeatSaverService {
return this.bsaverApi.searchMaps(search).then(res => {
return res.status === 200 ? res.data.docs : [];
}).catch(err => {
console.log(err);
return [];
});
@@ -16,8 +16,6 @@ export const DeleteMapsModal: ModalComponent<void, {linked: boolean, maps: BsmLo
const infoText = multiple ? "modals.maps-actions.delete-maps.info.desc.multiple" : "modals.maps-actions.delete-maps.info.desc.single";
const infoTitleText = multiple ? "modals.maps-actions.delete-maps.info.title.multiple" : "modals.maps-actions.delete-maps.info.title.single";
console.log(maps);
return (
<form className="text-gray-800 dark:text-gray-200">
<h1 className="text-3xl uppercase tracking-wide w-full text-center">{t(titleText)}</h1>
@@ -31,7 +31,6 @@ export function Modal() {
}
return () => {
console.log("oui");
window.removeEventListener("keyup", onEscape);
}
}, [ModalComponent])
@@ -22,8 +22,6 @@ type Props = {
export function BsmDropdownButton({className, items, align, withBar = true, icon = "settings", buttonClassName, menuTranslationY, children, text, textClassName}: Props) {
console.log("DROPDOWN", items);
const [expanded, setExpanded] = useState(false)
const t = useTranslation();
const ref = useRef(null)
@@ -27,7 +27,6 @@ export const BsmImage = forwardRef(({className, image, errorImage, placeholder,
})();
const handleError = (e: SyntheticEvent<HTMLImageElement, Event>) => {
console.log("ERROR");
e.currentTarget.onerror = null;
e.currentTarget.src = errorImage || "";
}
@@ -1,11 +1,9 @@
import { distinctUntilChanged, map } from "rxjs/operators";
import { BehaviorSubject, Observable, Subscription, timer } from "rxjs";
import { BehaviorSubject, Observable, Subscription, timer, of } from "rxjs";
import { IpcService } from "./ipc.service";
import { NotificationService } from "./notification.service";
import { CSSProperties } from "react";
import { ProgressionInterface } from "shared/models/progress-bar";
import { from } from "rxjs";
import { of } from "rxjs";
export class ProgressBarService{
@@ -79,7 +77,7 @@ export class ProgressBarService{
this.show(of(0), true, this._style$.value);
}
public hide(unsubscribe: boolean = true){
public hide(unsubscribe = true){
if(unsubscribe){ this.unsubscribe(); }
this._visible$.next(false);
}
@@ -93,7 +91,6 @@ export class ProgressBarService{
}
public setStyle(style: CSSProperties){
console.log("SET STYLE", style);
this._style$.next(style);
}