Skip to content

Commit

Permalink
format all
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed May 26, 2024
1 parent 50e9b86 commit da1a893
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/converters/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export async function mainConverter(
console.log(
`No available converter supports converting from ${fileType} to ${convertTo}.`,
);
return "File type not supported"
return "File type not supported";
}

try {
Expand All @@ -123,13 +123,13 @@ export async function mainConverter(
console.log(
`Converted ${inputFilePath} from ${fileType} to ${convertTo} successfully using ${converterName}.`,
);
return "Done"
return "Done";
} catch (error) {
console.error(
`Failed to convert ${inputFilePath} from ${fileType} to ${convertTo} using ${converterName}.`,
error,
);
return "Failed, check logs"
return "Failed, check logs";
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/helpers/normalizeFiletype.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const normalizeFiletype = (filetype: string): string => {
const lowercaseFiletype = filetype.toLowerCase();

switch (lowercaseFiletype) {
case "jpg":
return "jpeg";
Expand All @@ -11,11 +11,11 @@ export const normalizeFiletype = (filetype: string): string => {
default:
return lowercaseFiletype;
}
}
};

export const normalizeOutputFiletype = (filetype: string): string => {
const lowercaseFiletype = filetype.toLowerCase();

switch (lowercaseFiletype) {
case "jpeg":
return "jpg";
Expand All @@ -24,4 +24,4 @@ export const normalizeOutputFiletype = (filetype: string): string => {
default:
return lowercaseFiletype;
}
}
};
8 changes: 6 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ const app = new Elysia()
<optgroup label={converter}>
{targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<option value={`${target},${converter}`} safe>{target}</option>
<option value={`${target},${converter}`} safe>
{target}
</option>
))}
</optgroup>
))}
Expand All @@ -485,7 +487,9 @@ const app = new Elysia()
<optgroup label={converter}>
{targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<option value={`${target},${converter}`} safe>{target}</option>
<option value={`${target},${converter}`} safe>
{target}
</option>
))}
</optgroup>
),
Expand Down

0 comments on commit da1a893

Please sign in to comment.