refactor: run formatter

This commit is contained in:
Elias Schneider
2023-08-17 14:47:58 +02:00
parent 7b34cb14cb
commit f02e2979c4
48 changed files with 1018 additions and 573 deletions

View File

@@ -7,7 +7,7 @@ import { LOCALES } from "../../i18n/locales";
const LanguagePicker = () => {
const t = useTranslate();
const [selectedLanguage, setSelectedLanguage] = useState(
getCookie("language")?.toString()
getCookie("language")?.toString(),
);
const languages = Object.values(LOCALES).map((locale) => ({
@@ -23,7 +23,7 @@ const LanguagePicker = () => {
setCookie("language", value, {
sameSite: "lax",
expires: new Date(
new Date().setFullYear(new Date().getFullYear() + 1)
new Date().setFullYear(new Date().getFullYear() + 1),
),
});
location.reload();

View File

@@ -14,7 +14,7 @@ import userPreferences from "../../utils/userPreferences.util";
const ThemeSwitcher = () => {
const [colorScheme, setColorScheme] = useState(
userPreferences.get("colorScheme")
userPreferences.get("colorScheme"),
);
const { toggleColorScheme } = useMantineColorScheme();
const systemColorScheme = useColorScheme();
@@ -26,7 +26,7 @@ const ThemeSwitcher = () => {
userPreferences.set("colorScheme", value);
setColorScheme(value);
toggleColorScheme(
value == "system" ? systemColorScheme : (value as ColorScheme)
value == "system" ? systemColorScheme : (value as ColorScheme),
);
}}
data={[

View File

@@ -26,7 +26,7 @@ const showEnableTotpModal = (
qrCode: string;
secret: string;
password: string;
}
},
) => {
const t = translateOutsideContext();
return modals.openModal({

View File

@@ -5,7 +5,7 @@ import { translateOutsideContext } from "../../hooks/useTranslate.hook";
const showReverseShareLinkModal = (
modals: ModalsContextProps,
reverseShareToken: string,
appUrl: string
appUrl: string,
) => {
const t = translateOutsideContext();
const link = `${appUrl}/upload/${reverseShareToken}`;

View File

@@ -12,7 +12,7 @@ const showShareInformationsModal = (
modals: ModalsContextProps,
share: MyShare,
appUrl: string,
maxShareSize: number
maxShareSize: number,
) => {
const t = translateOutsideContext();
const link = `${appUrl}/s/${share.id}`;

View File

@@ -5,7 +5,7 @@ import { translateOutsideContext } from "../../hooks/useTranslate.hook";
const showShareLinkModal = (
modals: ModalsContextProps,
shareId: string,
appUrl: string
appUrl: string,
) => {
const t = translateOutsideContext();
const link = `${appUrl}/s/${shareId}`;