feat: init
This commit is contained in:
17
apps/web/ce/hooks/use-file-size.ts
Normal file
17
apps/web/ce/hooks/use-file-size.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// plane imports
|
||||
import { MAX_FILE_SIZE } from "@plane/constants";
|
||||
// hooks
|
||||
import { useInstance } from "@/hooks/store/use-instance";
|
||||
|
||||
type TReturnProps = {
|
||||
maxFileSize: number;
|
||||
};
|
||||
|
||||
export const useFileSize = (): TReturnProps => {
|
||||
// store hooks
|
||||
const { config } = useInstance();
|
||||
|
||||
return {
|
||||
maxFileSize: config?.file_size_limit ?? MAX_FILE_SIZE,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user