Skip to content

Commit 7073eab

Browse files
committed
Fix lint
1 parent 9ab905e commit 7073eab

File tree

14 files changed

+56
-58
lines changed

14 files changed

+56
-58
lines changed

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ const TEXT_EDITABLE_EXTENSIONS = new Set([
4545
const IFRAME_PREVIEWABLE_MIME_TYPES = new Set(['application/pdf'])
4646
const IFRAME_PREVIEWABLE_EXTENSIONS = new Set(['pdf'])
4747

48-
const IMAGE_PREVIEWABLE_MIME_TYPES = new Set([
49-
'image/png',
50-
'image/jpeg',
51-
'image/gif',
52-
'image/webp',
53-
])
48+
const IMAGE_PREVIEWABLE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp'])
5449
const IMAGE_PREVIEWABLE_EXTENSIONS = new Set(['png', 'jpg', 'jpeg', 'gif', 'webp'])
5550

5651
type FileCategory = 'text-editable' | 'iframe-previewable' | 'image-previewable' | 'unsupported'
@@ -377,7 +372,12 @@ function TextEditor({
377372
<div
378373
className={cn('min-w-0 flex-1 overflow-hidden', isResizing && 'pointer-events-none')}
379374
>
380-
<PreviewPanel content={revealedContent} mimeType={file.type} filename={file.name} isStreaming={isStreaming} />
375+
<PreviewPanel
376+
content={revealedContent}
377+
mimeType={file.type}
378+
filename={file.name}
379+
isStreaming={isStreaming}
380+
/>
381381
</div>
382382
</>
383383
)}

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ interface PreviewPanelProps {
4545
export function PreviewPanel({ content, mimeType, filename, isStreaming }: PreviewPanelProps) {
4646
const previewType = resolvePreviewType(mimeType, filename)
4747

48-
if (previewType === 'markdown') return <MarkdownPreview content={content} isStreaming={isStreaming} />
48+
if (previewType === 'markdown')
49+
return <MarkdownPreview content={content} isStreaming={isStreaming} />
4950
if (previewType === 'html') return <HtmlPreview content={content} />
5051
if (previewType === 'csv') return <CsvPreview content={content} />
5152
if (previewType === 'svg') return <SvgPreview content={content} />
@@ -127,9 +128,7 @@ const PREVIEW_MARKDOWN_COMPONENTS = {
127128
</a>
128129
),
129130
strong: ({ children }: any) => (
130-
<strong className='break-words font-semibold text-[var(--text-primary)]'>
131-
{children}
132-
</strong>
131+
<strong className='break-words font-semibold text-[var(--text-primary)]'>{children}</strong>
133132
),
134133
em: ({ children }: any) => (
135134
<em className='break-words text-[var(--text-tertiary)]'>{children}</em>
@@ -158,9 +157,7 @@ const PREVIEW_MARKDOWN_COMPONENTS = {
158157
{children}
159158
</th>
160159
),
161-
td: ({ children }: any) => (
162-
<td className='px-3 py-2 text-[var(--text-secondary)]'>{children}</td>
163-
),
160+
td: ({ children }: any) => <td className='px-3 py-2 text-[var(--text-secondary)]'>{children}</td>,
164161
}
165162

166163
const MarkdownPreview = memo(function MarkdownPreview({

apps/sim/app/workspace/[workspaceId]/files/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 6
66
export default function FilesLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
9+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[12px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -18,7 +18,7 @@ export default function FilesLoading() {
1818
</div>
1919
</div>
2020
</div>
21-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
21+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2222
<div className='flex items-center'>
2323
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
2424
<Skeleton className='ml-[10px] h-[14px] w-[120px] rounded-[4px]' />
@@ -27,7 +27,7 @@ export default function FilesLoading() {
2727
<div className='min-h-0 flex-1 overflow-auto'>
2828
<table className='w-full'>
2929
<thead>
30-
<tr className='border-b border-[var(--border)]'>
30+
<tr className='border-[var(--border)] border-b'>
3131
<th className='w-[40px] px-[12px] py-[8px]'>
3232
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
3333
</th>
@@ -40,7 +40,7 @@ export default function FilesLoading() {
4040
</thead>
4141
<tbody>
4242
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
43-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
43+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
4444
<td className='w-[40px] px-[12px] py-[10px]'>
4545
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
4646
</td>

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 4
66
export default function DocumentLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[16px] py-[8.5px]'>
9+
<div className='border-[var(--border)] border-b px-[16px] py-[8.5px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[8px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -18,7 +18,7 @@ export default function DocumentLoading() {
1818
</div>
1919
</div>
2020
</div>
21-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
21+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2222
<div className='flex items-center justify-between'>
2323
<div className='flex items-center'>
2424
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -32,7 +32,7 @@ export default function DocumentLoading() {
3232
<div className='min-h-0 flex-1 overflow-auto'>
3333
<table className='w-full'>
3434
<thead>
35-
<tr className='border-b border-[var(--border)]'>
35+
<tr className='border-[var(--border)] border-b'>
3636
<th className='w-[40px] px-[12px] py-[8px]'>
3737
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
3838
</th>
@@ -45,7 +45,7 @@ export default function DocumentLoading() {
4545
</thead>
4646
<tbody>
4747
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
48-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
48+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
4949
<td className='w-[40px] px-[12px] py-[10px]'>
5050
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
5151
</td>

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 7
66
export default function KnowledgeBaseLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[16px] py-[8.5px]'>
9+
<div className='border-[var(--border)] border-b px-[16px] py-[8.5px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[8px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -19,7 +19,7 @@ export default function KnowledgeBaseLoading() {
1919
</div>
2020
</div>
2121
</div>
22-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
22+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2323
<div className='flex items-center justify-between'>
2424
<div className='flex items-center'>
2525
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -34,7 +34,7 @@ export default function KnowledgeBaseLoading() {
3434
<div className='min-h-0 flex-1 overflow-auto'>
3535
<table className='w-full'>
3636
<thead>
37-
<tr className='border-b border-[var(--border)]'>
37+
<tr className='border-[var(--border)] border-b'>
3838
<th className='w-[40px] px-[12px] py-[8px]'>
3939
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
4040
</th>
@@ -47,7 +47,7 @@ export default function KnowledgeBaseLoading() {
4747
</thead>
4848
<tbody>
4949
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
50-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
50+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
5151
<td className='w-[40px] px-[12px] py-[10px]'>
5252
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
5353
</td>

apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 6
66
export default function KnowledgeLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
9+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[12px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -18,7 +18,7 @@ export default function KnowledgeLoading() {
1818
</div>
1919
</div>
2020

21-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
21+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2222
<div className='flex items-center'>
2323
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
2424
<Skeleton className='ml-[10px] h-[14px] w-[160px] rounded-[4px]' />
@@ -28,7 +28,7 @@ export default function KnowledgeLoading() {
2828
<div className='min-h-0 flex-1 overflow-auto'>
2929
<table className='w-full'>
3030
<thead>
31-
<tr className='border-b border-[var(--border)]'>
31+
<tr className='border-[var(--border)] border-b'>
3232
<th className='w-[40px] px-[12px] py-[8px]'>
3333
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
3434
</th>
@@ -41,7 +41,7 @@ export default function KnowledgeLoading() {
4141
</thead>
4242
<tbody>
4343
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
44-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
44+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
4545
<td className='w-[40px] px-[12px] py-[10px]'>
4646
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
4747
</td>

apps/sim/app/workspace/[workspaceId]/logs/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 6
66
export default function LogsLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
9+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[12px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -21,7 +21,7 @@ export default function LogsLoading() {
2121
</div>
2222
</div>
2323
</div>
24-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
24+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2525
<div className='flex items-center justify-between'>
2626
<div className='flex items-center'>
2727
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -36,7 +36,7 @@ export default function LogsLoading() {
3636
<div className='min-h-0 flex-1 overflow-auto'>
3737
<table className='w-full'>
3838
<thead>
39-
<tr className='border-b border-[var(--border)]'>
39+
<tr className='border-[var(--border)] border-b'>
4040
<th className='w-[40px] px-[12px] py-[8px]'>
4141
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
4242
</th>
@@ -49,7 +49,7 @@ export default function LogsLoading() {
4949
</thead>
5050
<tbody>
5151
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
52-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
52+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
5353
<td className='w-[40px] px-[12px] py-[10px]'>
5454
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
5555
</td>

apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 4
66
export default function ScheduledTasksLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
9+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[12px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -17,7 +17,7 @@ export default function ScheduledTasksLoading() {
1717
</div>
1818
</div>
1919
</div>
20-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
20+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2121
<div className='flex items-center'>
2222
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
2323
<Skeleton className='ml-[10px] h-[14px] w-[160px] rounded-[4px]' />
@@ -26,7 +26,7 @@ export default function ScheduledTasksLoading() {
2626
<div className='min-h-0 flex-1 overflow-auto'>
2727
<table className='w-full'>
2828
<thead>
29-
<tr className='border-b border-[var(--border)]'>
29+
<tr className='border-[var(--border)] border-b'>
3030
<th className='w-[40px] px-[12px] py-[8px]'>
3131
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
3232
</th>
@@ -39,7 +39,7 @@ export default function ScheduledTasksLoading() {
3939
</thead>
4040
<tbody>
4141
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
42-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
42+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
4343
<td className='w-[40px] px-[12px] py-[10px]'>
4444
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
4545
</td>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 5
66
export default function TableDetailLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[16px] py-[8.5px]'>
9+
<div className='border-[var(--border)] border-b px-[16px] py-[8.5px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[8px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -22,7 +22,7 @@ export default function TableDetailLoading() {
2222
<div className='min-h-0 flex-1 overflow-auto'>
2323
<table className='w-full'>
2424
<thead>
25-
<tr className='border-b border-[var(--border)]'>
25+
<tr className='border-[var(--border)] border-b'>
2626
{Array.from({ length: COLUMN_COUNT }).map((_, i) => (
2727
<th key={i} className='px-[12px] py-[8px] text-left'>
2828
<Skeleton className='h-[12px] w-[72px] rounded-[4px]' />
@@ -32,7 +32,7 @@ export default function TableDetailLoading() {
3232
</thead>
3333
<tbody>
3434
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
35-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
35+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
3636
{Array.from({ length: COLUMN_COUNT }).map((_, colIndex) => (
3737
<td key={colIndex} className='px-[12px] py-[10px]'>
3838
<Skeleton

apps/sim/app/workspace/[workspaceId]/tables/loading.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const COLUMN_COUNT = 6
66
export default function TablesLoading() {
77
return (
88
<div className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
9-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
9+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
1010
<div className='flex items-center justify-between'>
1111
<div className='flex items-center gap-[12px]'>
1212
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
@@ -17,7 +17,7 @@ export default function TablesLoading() {
1717
</div>
1818
</div>
1919
</div>
20-
<div className='border-b border-[var(--border)] px-[24px] py-[10px]'>
20+
<div className='border-[var(--border)] border-b px-[24px] py-[10px]'>
2121
<div className='flex items-center'>
2222
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
2323
<Skeleton className='ml-[10px] h-[14px] w-[120px] rounded-[4px]' />
@@ -26,7 +26,7 @@ export default function TablesLoading() {
2626
<div className='min-h-0 flex-1 overflow-auto'>
2727
<table className='w-full'>
2828
<thead>
29-
<tr className='border-b border-[var(--border)]'>
29+
<tr className='border-[var(--border)] border-b'>
3030
<th className='w-[40px] px-[12px] py-[8px]'>
3131
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
3232
</th>
@@ -39,7 +39,7 @@ export default function TablesLoading() {
3939
</thead>
4040
<tbody>
4141
{Array.from({ length: SKELETON_ROW_COUNT }).map((_, rowIndex) => (
42-
<tr key={rowIndex} className='border-b border-[var(--border)]'>
42+
<tr key={rowIndex} className='border-[var(--border)] border-b'>
4343
<td className='w-[40px] px-[12px] py-[10px]'>
4444
<Skeleton className='h-[14px] w-[14px] rounded-[2px]' />
4545
</td>

0 commit comments

Comments
 (0)