Skip to content

Commit

Permalink
remove unnecessary global states
Browse files Browse the repository at this point in the history
  • Loading branch information
vwh committed Jul 31, 2024
1 parent 5eaaaef commit cde6fbe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/components/table-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export default function DBTableComponent({
tableName,
tableSchemas
}: DBTableComponentProps) {
console.log("DEBUG: columns", columns, typeof columns);
const tableHead = useMemo(
() => (
<TableHeader>
Expand Down
4 changes: 0 additions & 4 deletions src/store/useSQLiteStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ interface SQLiteState {
setQueryError: (value: string | null) => void;
setTables: (tables: { name: string; count: number }[]) => void;
setSelectedTable: (value: string) => void;
setTableSchemas: (schemas: TableInfo) => void;
rowPerPageOrAuto: number | "auto";
setRowPerPageOrAuto: (value: number | "auto") => void;
customQuery: string;
setCustomQuery: (value: string) => void;
isCustomQuery: boolean;
setIsCustomQuery: (value: boolean) => void;
queryHestory: string[];
setQueryHestory: (value: string[]) => void;
unShiftToQueryHestory: (value: string) => void;
expandPage: boolean;
setExpandPage: (value: boolean) => void;
Expand Down Expand Up @@ -97,7 +95,6 @@ const initializeStore = create<SQLiteState>((set, get) => ({
setQueryError: (value: string | null) => set({ queryError: value }),
setTables: (tables: { name: string; count: number }[]) => set({ tables }),
setSelectedTable: (value: string) => set({ selectedTable: value }),
setTableSchemas: (schemas: TableInfo) => set({ tableSchemas: schemas }),
setRowPerPageOrAuto: (value: number | "auto") =>
set({ rowPerPageOrAuto: value }),

Expand All @@ -106,7 +103,6 @@ const initializeStore = create<SQLiteState>((set, get) => ({
setCustomQuery: (value: string) => set({ customQuery: value }),

queryHestory: [],
setQueryHestory: (value: string[]) => set({ queryHestory: value }),
unShiftToQueryHestory: (value: string) =>
set((state) => ({ queryHestory: [value, ...state.queryHestory] })),

Expand Down

0 comments on commit cde6fbe

Please sign in to comment.