Arrow functions and so

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-05-13 01:18:04 +02:00
parent 615ec68931
commit a58c52631e
352 changed files with 2894 additions and 3693 deletions

View File

@@ -1,12 +1,10 @@
import { useMemo } from 'react';
/** Return a preview URL for a file. */
function usePreview(file: File | null | undefined): string | undefined {
return useMemo(() => {
if (file) {
return URL.createObjectURL(file);
}
}, [file]);
}
const usePreview = (file: File | null | undefined): string | undefined => useMemo(() => {
if (file) {
return URL.createObjectURL(file);
}
}, [file]);
export { usePreview };