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

@@ -0,0 +1,22 @@
// @ts-nocheck
import { useFormikContext } from 'formik';
import { FFormGroup } from '@/components';
import { CompanyLogoUpload } from './CompanyLogoUpload';
export function BrandingCompanyLogoUploadField() {
const { setFieldValue, values } = useFormikContext();
return (
<FFormGroup name={'companyLogo'} label={''} fastField>
<CompanyLogoUpload
initialPreview={values.companyLogoUri}
onChange={(file) => {
const imageUrl = file ? URL.createObjectURL(file) : '';
setFieldValue('_companyLogoFile', file);
setFieldValue('companyLogoUri', imageUrl);
}}
/>
</FFormGroup>
);
}