Skip to content

Commit fb85ec0

Browse files
committed
Minor cleanup
1 parent 82a8090 commit fb85ec0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

mathesar_ui/src/stores/tables.ts

+4-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
collapse,
1818
type RecursivePartial,
1919
} from '@mathesar-component-library';
20-
import type { DBObjectEntry } from '@mathesar/AppTypes';
2120
import type { JoinableTablesResult } from '@mathesar/api/rest/types/tables/joinable_tables';
2221
import type {
2322
SplitTableRequest,
@@ -435,22 +434,20 @@ export function getJoinableTablesResult(tableId: number, maxDepth = 1) {
435434
);
436435
}
437436

438-
type TableSettings = Table['settings'];
439-
440437
async function saveTableSettings(
441438
connection: Pick<Connection, 'id'>,
442439
table: Pick<Table, 'oid' | 'settings' | 'schema'>,
443-
settings: RecursivePartial<TableSettings>,
440+
settings: RecursivePartial<Table['settings']>,
444441
): Promise<void> {
445442
const url = `/api/db/v0/tables/${table.oid}/settings/${table.settings.id}/`;
446-
await patchAPI<TableSettings>(url, settings);
443+
await patchAPI<Table['settings']>(url, settings);
447444
await refetchTablesForSchema(connection, { oid: table.schema });
448445
}
449446

450447
export function saveRecordSummaryTemplate(
451448
connection: Pick<Connection, 'id'>,
452449
table: Pick<Table, 'oid' | 'settings' | 'schema'>,
453-
previewSettings: TableSettings['preview_settings'],
450+
previewSettings: Table['settings']['preview_settings'],
454451
): Promise<void> {
455452
const { customized } = previewSettings;
456453
return saveTableSettings(connection, table, {
@@ -461,7 +458,7 @@ export function saveRecordSummaryTemplate(
461458
export function saveColumnOrder(
462459
connection: Pick<Connection, 'id'>,
463460
table: Pick<Table, 'oid' | 'settings' | 'schema'>,
464-
columnOrder: TableSettings['column_order'],
461+
columnOrder: Table['settings']['column_order'],
465462
): Promise<void> {
466463
return saveTableSettings(connection, table, {
467464
// Using the Set constructor to remove potential duplicates

0 commit comments

Comments
 (0)