Unverified Commit 8ae1eb0e authored by Matri's avatar Matri Committed by GitHub

lint: frontend linting issues (#744)

parent 2ba89d0d
'use client'
import React from 'react'
import Tooltip from '@/app/components/base/tooltip'
import { t } from 'i18next'
import s from './style.module.css'
import copy from 'copy-to-clipboard'
import s from './style.module.css'
import Tooltip from '@/app/components/base/tooltip'
type ICopyBtnProps = {
value: string
......@@ -25,9 +24,9 @@ const CopyBtn = ({
className='z-10'
>
<div
className={`box-border p-0.5 flex items-center justify-center rounded-md bg-white cursor-pointer`}
className={'box-border p-0.5 flex items-center justify-center rounded-md bg-white cursor-pointer'}
style={{
boxShadow: '0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06)'
boxShadow: '0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06)',
}}
onClick={() => {
copy(value)
......
'use client'
import React, { FC } from 'react'
import type { FC } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import cn from 'classnames'
import copy from 'copy-to-clipboard'
import NoData from './no-data'
import type { SavedMessage } from '@/models/debug'
import { Markdown } from '@/app/components/base/markdown'
import { SimpleBtn, copyIcon } from '@/app/components/app/text-generate/item'
import copy from 'copy-to-clipboard'
import Toast from '@/app/components/base/toast'
import NoData from './no-data'
export interface ISavedItemsProps {
export type ISavedItemsProps = {
className?: string
list: SavedMessage[],
list: SavedMessage[]
onRemove: (id: string) => void
onStartCreateContent: () => void
}
......@@ -26,23 +27,25 @@ const SavedItems: FC<ISavedItemsProps> = ({
className,
list,
onRemove,
onStartCreateContent
onStartCreateContent,
}) => {
const { t } = useTranslation()
return (
<div className={cn(className, 'space-y-3')}>
{list.length === 0 ? (
{list.length === 0
? (
<div className='px-6'>
<NoData onStartCreateContent={onStartCreateContent} />
</div>
) : (<>
)
: (<>
{list.map(({ id, answer }) => (
<div
key={id}
className='p-4 rounded-xl bg-gray-50'
style={{
boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)'
boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)',
}}
>
<Markdown content={answer} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment