Merge branch 'develop' into feature/rowy-285-cms

* develop:
  Update deploy-preview.yml
  add function correct fcn express to sort in accending order
This commit is contained in:
Sidney Alcantara
2022-02-11 17:28:06 +11:00
2 changed files with 5 additions and 6 deletions

View File

@@ -6,9 +6,9 @@ on:
# paths:
# - "website/**"
env:
REACT_APP_FIREBASE_PROJECT_ID: tryrowy
REACT_APP_FIREBASE_PROJECT_ID: rowyio
REACT_APP_FIREBASE_PROJECT_WEB_API_KEY:
"${{ secrets.FIREBASE_WEB_API_KEY_TRYROWY }}"
"${{ secrets.FIREBASE_WEB_API_KEY_ROWYIO }}"
CI: ""
jobs:
build_and_preview:
@@ -27,6 +27,6 @@ jobs:
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount:
"${{ secrets.FIREBASE_SERVICE_ACCOUNT_TRYROWY }}"
"${{ secrets.FIREBASE_SERVICE_ACCOUNT_ROWYIO }}"
expires: 14d
projectId: tryrowy
projectId: rowyio

View File

@@ -157,7 +157,6 @@ const useTableConfig = (tableId?: string) => {
*/
const remove = (key: string) => {
const { columns } = tableConfigState;
/**
* Filter column, and remove key index
* Sort and reorder column
@@ -165,7 +164,7 @@ const useTableConfig = (tableId?: string) => {
*/
const updatedColumns: any = Object.values(columns)
.filter((c: any) => c.key !== key)
.sort((c: any) => c.index)
.sort((a: any, b: any) => a.index - b.index)
.reduce((acc: any, curr: any, index: any) => {
acc[curr.key] = { ...curr, index };
return acc;