mirror of
https://github.com/langgenius/dify.git
synced 2026-02-24 18:05:11 +00:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { render } from '@testing-library/react'
|
||||
import React from 'react'
|
||||
import Loading from './index'
|
||||
|
||||
describe('Loading Component', () => {
|
||||
@@ -15,7 +15,7 @@ describe('Loading Component', () => {
|
||||
})
|
||||
|
||||
it('renders correctly with app type', () => {
|
||||
const { container } = render(<Loading type='app' />)
|
||||
const { container } = render(<Loading type="app" />)
|
||||
expect(container.firstChild).toHaveClass('h-full')
|
||||
})
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import './style.css'
|
||||
|
||||
type ILoadingProps = {
|
||||
type?: 'area' | 'app'
|
||||
}
|
||||
@@ -15,11 +16,11 @@ const Loading = (
|
||||
return (
|
||||
<div
|
||||
className={`flex w-full items-center justify-center ${type === 'app' ? 'h-full' : ''}`}
|
||||
role='status'
|
||||
aria-live='polite'
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
aria-label={t('appApi.loading')}
|
||||
>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" className='spin-animation'>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" className="spin-animation">
|
||||
<g clipPath="url(#clip0_324_2488)">
|
||||
<path d="M15 0H10C9.44772 0 9 0.447715 9 1V6C9 6.55228 9.44772 7 10 7H15C15.5523 7 16 6.55228 16 6V1C16 0.447715 15.5523 0 15 0Z" fill="#1C64F2" />
|
||||
<path opacity="0.5" d="M15 9H10C9.44772 9 9 9.44772 9 10V15C9 15.5523 9.44772 16 10 16H15C15.5523 16 16 15.5523 16 15V10C16 9.44772 15.5523 9 15 9Z" fill="#1C64F2" />
|
||||
|
||||
Reference in New Issue
Block a user