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

@@ -11,7 +11,7 @@ export const getExpirationPreview = (
expiration_num: number;
expiration_unit: string;
};
}
},
) => {
const value = form.values.never_expires
? "never"
@@ -21,12 +21,12 @@ export const getExpirationPreview = (
const expirationDate = moment()
.add(
value.split("-")[0],
value.split("-")[1] as moment.unitOfTime.DurationConstructor
value.split("-")[1] as moment.unitOfTime.DurationConstructor,
)
.toDate();
return messages.expiresOn.replace(
"{expiration}",
moment(expirationDate).format("LLL")
moment(expirationDate).format("LLL"),
);
};

View File

@@ -12,7 +12,7 @@ const getLanguageFromAcceptHeader = (acceptLanguage?: string) => {
const languages = acceptLanguage.split(",").map((l) => l.split(";")[0]);
const supportedLanguages = Object.values(LOCALES).map((l) => l.code);
const supportedLanguagesWithoutRegion = supportedLanguages.map(
(l) => l.split("-")[0]
(l) => l.split("-")[0],
);
for (const language of languages) {
@@ -23,7 +23,7 @@ const getLanguageFromAcceptHeader = (acceptLanguage?: string) => {
supportedLanguagesWithoutRegion.includes(language.split("-")[0])
) {
const similarLanguage = supportedLanguages.find((l) =>
l.startsWith(language.split("-")[0])
l.startsWith(language.split("-")[0]),
);
return similarLanguage;
}

View File

@@ -20,7 +20,7 @@ const axiosError = (axiosError: any) =>
const success = (
message: string,
config?: Omit<NotificationProps, "message">
config?: Omit<NotificationProps, "message">,
) =>
showNotification({
icon: <TbCheck />,