Change to using arrow functions (#1603)
* Change to using arrow functions Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Add lint rule --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -9,7 +9,7 @@ import { fieldsForCompany } from '../utils/fieldsForCompany';
|
||||
|
||||
export type FieldCompanyMapping = (typeof fieldsForCompany)[number]['key'];
|
||||
|
||||
export function useSpreadsheetCompanyImport() {
|
||||
export const useSpreadsheetCompanyImport = () => {
|
||||
const { openSpreadsheetImport } = useSpreadsheetImport<FieldCompanyMapping>();
|
||||
const { enqueueSnackBar } = useSnackBar();
|
||||
|
||||
@ -23,7 +23,7 @@ export function useSpreadsheetCompanyImport() {
|
||||
) => {
|
||||
openSpreadsheetImport({
|
||||
...options,
|
||||
async onSubmit(data) {
|
||||
onSubmit: async (data) => {
|
||||
// TODO: Add better type checking in spreadsheet import later
|
||||
const createInputs = data.validData.map((company) => ({
|
||||
id: uuidv4(),
|
||||
@ -56,4 +56,4 @@ export function useSpreadsheetCompanyImport() {
|
||||
};
|
||||
|
||||
return { openCompanySpreadsheetImport };
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user