Skip to content

Commit 76981c3

Browse files
committed
update schedule creation ui and run lint
1 parent 4c562c8 commit 76981c3

File tree

2 files changed

+23
-15
lines changed
  • apps/sim/app/workspace/[workspaceId]

2 files changed

+23
-15
lines changed

apps/sim/app/workspace/[workspaceId]/schedules/components/create-schedule-modal/schedule-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ export function ScheduleModal({ open, onOpenChange, workspaceId, schedule }: Sch
516516

517517
{/* Schedule Preview */}
518518
{computedCron && schedulePreview && (
519-
<div className='rounded-[8px] border border-[var(--border-1)] bg-[var(--surface-2)] px-[12px] py-[10px]'>
519+
<div>
520520
{'error' in schedulePreview ? (
521521
<p className='text-[13px] text-[var(--text-error)]'>{schedulePreview.error}</p>
522522
) : (

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table/table.tsx

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -598,25 +598,34 @@ export function Table() {
598598
setRenamingColumn(null)
599599
return
600600
}
601-
updateColumnMutation.mutate({ columnName: renamingColumn, updates: { name: renameValue.trim() } })
601+
updateColumnMutation.mutate({
602+
columnName: renamingColumn,
603+
updates: { name: renameValue.trim() },
604+
})
602605
setRenamingColumn(null)
603606
}, [renamingColumn, renameValue])
604607

605608
const handleChangeType = useCallback((columnName: string, newType: string) => {
606609
updateColumnMutation.mutate({ columnName, updates: { type: newType } })
607610
}, [])
608611

609-
const handleInsertColumnLeft = useCallback((columnName: string) => {
610-
const index = columnsRef.current.findIndex((c) => c.name === columnName)
611-
if (index === -1) return
612-
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index })
613-
}, [generateColumnName])
612+
const handleInsertColumnLeft = useCallback(
613+
(columnName: string) => {
614+
const index = columnsRef.current.findIndex((c) => c.name === columnName)
615+
if (index === -1) return
616+
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index })
617+
},
618+
[generateColumnName]
619+
)
614620

615-
const handleInsertColumnRight = useCallback((columnName: string) => {
616-
const index = columnsRef.current.findIndex((c) => c.name === columnName)
617-
if (index === -1) return
618-
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index + 1 })
619-
}, [generateColumnName])
621+
const handleInsertColumnRight = useCallback(
622+
(columnName: string) => {
623+
const index = columnsRef.current.findIndex((c) => c.name === columnName)
624+
if (index === -1) return
625+
addColumnMutation.mutate({ name: generateColumnName(), type: 'string', position: index + 1 })
626+
},
627+
[generateColumnName]
628+
)
620629

621630
const handleToggleUnique = useCallback((columnName: string) => {
622631
const column = columnsRef.current.find((c) => c.name === columnName)
@@ -683,7 +692,6 @@ export function Table() {
683692
[columnOptions, activeSortState, handleSortChange, handleSortClear]
684693
)
685694

686-
687695
if (!isLoadingTable && !tableData) {
688696
return (
689697
<div className='flex h-full items-center justify-center'>
@@ -970,8 +978,8 @@ export function Table() {
970978
<ModalBody>
971979
<p className='text-[13px] text-[var(--text-secondary)]'>
972980
Are you sure you want to delete{' '}
973-
<span className='font-medium text-[var(--text-primary)]'>{deletingColumn}</span>?
974-
This will remove all data in this column.{' '}
981+
<span className='font-medium text-[var(--text-primary)]'>{deletingColumn}</span>? This
982+
will remove all data in this column.{' '}
975983
<span className='text-[var(--text-error)]'>This action cannot be undone.</span>
976984
</p>
977985
</ModalBody>

0 commit comments

Comments
 (0)