refactor: run formatter
This commit is contained in:
@@ -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"),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ const axiosError = (axiosError: any) =>
|
||||
|
||||
const success = (
|
||||
message: string,
|
||||
config?: Omit<NotificationProps, "message">
|
||||
config?: Omit<NotificationProps, "message">,
|
||||
) =>
|
||||
showNotification({
|
||||
icon: <TbCheck />,
|
||||
|
||||
Reference in New Issue
Block a user