mirror of
https://github.com/rowyio/rowy.git
synced 2026-02-24 04:01:17 +01:00
run prettier
This commit is contained in:
@@ -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))
|
||||
);
|
||||
};
|
||||
|
||||
@@ -41,4 +41,3 @@ export enum FieldType {
|
||||
last = "LAST",
|
||||
status = "STATUS",
|
||||
}
|
||||
|
||||
|
||||
@@ -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 });
|
||||
|
||||
@@ -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`;
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user