The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Remove filter reducer
Joshen Lim1111e04b16dd
diff --git a/studio/components/grid/store/reducers/filter.ts b/studio/components/grid/store/reducers/filter.tsnew file mode 100644index 00000000000..0e6397f0b3a--- /dev/null+++ b/studio/components/grid/store/reducers/filter.ts@@ -0,0 +1,32 @@+import { TOTAL_ROWS_RESET } from '../../constants'+import { Filter } from '../../types'++// [JOSHEN TODO] Should be able to deprecate this entire reducer++export interface FilterInitialState {+ filters: Filter[]+}++export const filterInitialState: FilterInitialState = { filters: [] }++type FILTER_ACTIONTYPE = {+ type: 'UPDATE_FILTERS'+ payload: {}+}++const FilterReducer = (state: FilterInitialState, action: FILTER_ACTIONTYPE) => {+ switch (action.type) {+ case 'UPDATE_FILTERS': {+ // [JOSHEN TODO] THIS COULD BE AT THE BASE REDUCER UPDATE FILTER SORT FOR EG+ const newState: any = { ...state }+ newState.page = 1+ newState.refreshPageFlag = Date.now()+ newState.totalRows = TOTAL_ROWS_RESET+ return newState+ }+ default:+ return state+ }+}++export default FilterReducer