Skip to content

Commit 03b9dbb

Browse files
committed
Lint
1 parent 257087a commit 03b9dbb

2 files changed

Lines changed: 38 additions & 15 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { memo, useCallback, useEffect, useMemo, useRef } from 'react'
22
import ReactMarkdown from 'react-markdown'
3-
import remarkGfm from 'remark-gfm'
43
import { type NodeProps, useUpdateNodeInternals } from 'reactflow'
4+
import remarkGfm from 'remark-gfm'
55
import { cn } from '@/lib/utils'
66
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
77
import { usePanelEditorStore } from '@/stores/panel-new/editor/store'
@@ -38,29 +38,52 @@ const NoteMarkdown = memo(function NoteMarkdown({ content }: { content: string }
3838
<ReactMarkdown
3939
remarkPlugins={[remarkGfm]}
4040
components={{
41-
p: ({ children }) => <p className='mb-0 text-sm text-[#E5E5E5]'>{children}</p>,
42-
h1: ({ children }) => <h1 className='mt-0 mb-[-2px] text-lg font-semibold text-[#E5E5E5]'>{children}</h1>,
43-
h2: ({ children }) => <h2 className='mt-0 mb-[-2px] text-base font-semibold text-[#E5E5E5]'>{children}</h2>,
44-
h3: ({ children }) => <h3 className='mt-0 mb-[-2px] text-sm font-semibold text-[#E5E5E5]'>{children}</h3>,
45-
h4: ({ children }) => <h4 className='mt-0 mb-[-2px] text-xs font-semibold text-[#E5E5E5]'>{children}</h4>,
46-
ul: ({ children }) => <ul className='-mt-[2px] mb-0 list-disc pl-4 text-sm text-[#E5E5E5]'>{children}</ul>,
47-
ol: ({ children }) => <ol className='-mt-[2px] mb-0 list-decimal pl-4 text-sm text-[#E5E5E5]'>{children}</ol>,
41+
p: ({ children }) => <p className='mb-0 text-[#E5E5E5] text-sm'>{children}</p>,
42+
h1: ({ children }) => (
43+
<h1 className='mt-0 mb-[-2px] font-semibold text-[#E5E5E5] text-lg'>{children}</h1>
44+
),
45+
h2: ({ children }) => (
46+
<h2 className='mt-0 mb-[-2px] font-semibold text-[#E5E5E5] text-base'>{children}</h2>
47+
),
48+
h3: ({ children }) => (
49+
<h3 className='mt-0 mb-[-2px] font-semibold text-[#E5E5E5] text-sm'>{children}</h3>
50+
),
51+
h4: ({ children }) => (
52+
<h4 className='mt-0 mb-[-2px] font-semibold text-[#E5E5E5] text-xs'>{children}</h4>
53+
),
54+
ul: ({ children }) => (
55+
<ul className='-mt-[2px] mb-0 list-disc pl-4 text-[#E5E5E5] text-sm'>{children}</ul>
56+
),
57+
ol: ({ children }) => (
58+
<ol className='-mt-[2px] mb-0 list-decimal pl-4 text-[#E5E5E5] text-sm'>{children}</ol>
59+
),
4860
li: ({ children }) => <li className='mb-0'>{children}</li>,
4961
code: ({ inline, children }: any) =>
5062
inline ? (
51-
<code className='rounded bg-[#393939] px-1 py-0.5 text-xs text-[#F59E0B]'>{children}</code>
63+
<code className='rounded bg-[#393939] px-1 py-0.5 text-[#F59E0B] text-xs'>
64+
{children}
65+
</code>
5266
) : (
53-
<code className='block rounded bg-[#1A1A1A] p-2 text-xs text-[#E5E5E5]'>{children}</code>
67+
<code className='block rounded bg-[#1A1A1A] p-2 text-[#E5E5E5] text-xs'>
68+
{children}
69+
</code>
5470
),
5571
a: ({ href, children }) => (
56-
<a href={href} target='_blank' rel='noopener noreferrer' className='text-[#33B4FF] underline-offset-2 hover:underline'>
72+
<a
73+
href={href}
74+
target='_blank'
75+
rel='noopener noreferrer'
76+
className='text-[#33B4FF] underline-offset-2 hover:underline'
77+
>
5778
{children}
5879
</a>
5980
),
6081
strong: ({ children }) => <strong className='font-semibold text-white'>{children}</strong>,
6182
em: ({ children }) => <em className='text-[#B8B8B8]'>{children}</em>,
6283
blockquote: ({ children }) => (
63-
<blockquote className='m-0 border-l-2 border-[#F59E0B] pl-3 italic text-[#B8B8B8]'>{children}</blockquote>
84+
<blockquote className='m-0 border-[#F59E0B] border-l-2 pl-3 text-[#B8B8B8] italic'>
85+
{children}
86+
</blockquote>
6487
),
6588
}}
6689
>
@@ -197,7 +220,9 @@ export const NoteBlock = memo(function NoteBlock({ id, data }: NodeProps<NoteBlo
197220
) : showMarkdown ? (
198221
<NoteMarkdown content={content} />
199222
) : (
200-
<p className='whitespace-pre-wrap text-[#E5E5E5] text-sm leading-relaxed'>{content}</p>
223+
<p className='whitespace-pre-wrap text-[#E5E5E5] text-sm leading-relaxed'>
224+
{content}
225+
</p>
201226
)}
202227
</div>
203228
</div>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
22
import { useParams } from 'next/navigation'
3-
import ReactMarkdown from 'react-markdown'
4-
import remarkGfm from 'remark-gfm'
53
import { Handle, type NodeProps, Position, useUpdateNodeInternals } from 'reactflow'
64
import { Badge } from '@/components/emcn/components/badge/badge'
75
import { Tooltip } from '@/components/emcn/components/tooltip/tooltip'

0 commit comments

Comments
 (0)