feat: Uploading company logo

This commit is contained in:
Ahmed Bouhuolia
2024-09-24 20:28:19 +02:00
parent d16c57b63b
commit 37fd4a1fdb
20 changed files with 404 additions and 171 deletions

View File

@@ -13,7 +13,6 @@ import jsCookie from 'js-cookie';
import { deepMapKeys } from './map-key-deep';
export * from './deep';
export const getCookie = (name, defaultValue) =>
_.defaultTo(jsCookie.get(name), defaultValue);
@@ -352,6 +351,14 @@ export const transformToForm = (obj, emptyInitialValues) => {
);
};
export function excludePrivateProps(
obj: Record<string, any>,
): Record<string, any> {
return Object.fromEntries(
Object.entries(obj).filter(([key, value]) => !key.startsWith('_')),
);
}
export function inputIntent({ error, touched }) {
return error && touched ? Intent.DANGER : '';
}