From 79b05d17fb79f195f6fef1e43f0ccaa154524b08 Mon Sep 17 00:00:00 2001 From: David Horm Date: Sun, 2 Apr 2023 17:42:13 -0700 Subject: [PATCH 1/2] fix: update predeploy and deploy scripts --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bd0a496..58ac735 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "test:unit": "vitest", "test:e2e": "pnpm dlx playwright test", "codegen": "concurrently --kill-others \"vite\" \"pnpm dlx playwright codegen\"", - "predeploy": "pnpm run build", - "deploy": "gh-pages -d dist" + "predeploy": "pnpm test && pnpm dlx rimraf ./dist && pnpm run build", + "deploy": "pnpm run predeploy && gh-pages -d dist" }, "dependencies": { "@emotion/react": "^11.10.5", From aa0a6ea3c74eab7333b2afbc791047588b605e2f Mon Sep 17 00:00:00 2001 From: David Horm Date: Sun, 2 Apr 2023 17:42:20 -0700 Subject: [PATCH 2/2] fix: build --- src/services/filter-sort-services/useCollectionFilters.ts | 2 +- src/services/filter-sort-services/username.service.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/filter-sort-services/useCollectionFilters.ts b/src/services/filter-sort-services/useCollectionFilters.ts index 25b66ca..bd86c65 100644 --- a/src/services/filter-sort-services/useCollectionFilters.ts +++ b/src/services/filter-sort-services/useCollectionFilters.ts @@ -282,7 +282,7 @@ type Props = Partial<{ isInitialSortStateEmpty: boolean; }>; -export const useCollectionFilters = (props: Props) => { +export const useCollectionFilters = (props?: Props) => { const [filterState, filterDispatch] = useReducer(reducer, initialFilterState); const initialSortState = props?.isInitialSortStateEmpty diff --git a/src/services/filter-sort-services/username.service.ts b/src/services/filter-sort-services/username.service.ts index 29f6145..0f35567 100644 --- a/src/services/filter-sort-services/username.service.ts +++ b/src/services/filter-sort-services/username.service.ts @@ -9,4 +9,5 @@ export const usernameService: FilterControl = { getReducedState: (state, username) => ({ ...state, username }), setQueryParam: (searchParams, state) => searchParams.set(QUERY_PARAM_USERNAME, state.username), + applyFilters: () => (notUsed) => notUsed, };