run prettier

This commit is contained in:
Sidney Alcantara
2021-07-01 21:30:59 +10:00
parent e0b320fb50
commit 4476cb4d3c
6 changed files with 17 additions and 13 deletions

View File

@@ -76,7 +76,7 @@ export const FIELDS: IFieldConfig[] = [
// FIRETABLE
User,
Id,
Status
Status,
];
/**
@@ -104,7 +104,9 @@ export const isFieldType = (fieldType: any) => {
* Returns array of fieldTypes with dataType included dataTypes array
* @param dataTypes
*/
export const hasDataTypes = (dataTypes:string[])=>{
const fieldTypes = FIELDS.map((field) => field.type);
return fieldTypes.filter((fieldType)=>dataTypes.includes(getFieldProp("dataType",fieldType)))
}
export const hasDataTypes = (dataTypes: string[]) => {
const fieldTypes = FIELDS.map((field) => field.type);
return fieldTypes.filter((fieldType) =>
dataTypes.includes(getFieldProp("dataType", fieldType))
);
};

View File

@@ -41,4 +41,3 @@ export enum FieldType {
last = "LAST",
status = "STATUS",
}

View File

@@ -2,7 +2,7 @@ import { functions } from "./index";
export enum CLOUD_FUNCTIONS {
ImpersonatorAuth = "callable-ImpersonatorAuth",
getAlgoliaSearchKey = 'getAlgoliaSearchKey'
getAlgoliaSearchKey = "getAlgoliaSearchKey",
}
export const cloudFunction = (
@@ -29,5 +29,5 @@ export const cloudFunction = (
export const ImpersonatorAuth = (email: string) =>
functions.httpsCallable(CLOUD_FUNCTIONS.ImpersonatorAuth)({ email });
export const getAlgoliaSearchKey = (index: string) =>
functions.httpsCallable(CLOUD_FUNCTIONS.getAlgoliaSearchKey)({ index });
export const getAlgoliaSearchKey = (index: string) =>
functions.httpsCallable(CLOUD_FUNCTIONS.getAlgoliaSearchKey)({ index });

View File

@@ -20,7 +20,7 @@ db.enablePersistence({ synchronizeTabs: true });
export const bucket = firebase.storage();
export const functions = firebase.functions();
export const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID
export const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID;
export const WEBHOOK_URL = `https://${(functions as any).region_}-${
appConfig.projectId
}.cloudfunctions.net/webhook`;

View File

@@ -11,7 +11,7 @@ export type FiretableActions = {
update: Function;
reorder: Function;
};
row: { add: Function; delete: Function; more: Function, update:Function};
row: { add: Function; delete: Function; more: Function; update: Function };
table: {
set: Function;
filter: Function;
@@ -94,7 +94,7 @@ const useFiretable = (
},
row: {
add: tableActions.addRow,
update:tableActions.updateRow,
update: tableActions.updateRow,
delete: tableActions.deleteRow,
more: tableActions.moreRows,
},

View File

@@ -27,7 +27,10 @@ export const arrayMover = (
return arr; // for testing purposes
};
export const missingFieldsReducer = (data: any) => (acc: string[], curr: string) => {
export const missingFieldsReducer = (data: any) => (
acc: string[],
curr: string
) => {
if (data[curr] === undefined) {
return [...acc, curr];
} else return acc;