mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import type { Category } from '../index'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Cloud, SelfHosted } from '../assets'
|
||||
import Tab from './tab'
|
||||
import Divider from '@/app/components/base/divider'
|
||||
import type { PlanRange } from './plan-range-switcher'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Divider from '@/app/components/base/divider'
|
||||
import { Cloud, SelfHosted } from '../assets'
|
||||
import PlanRangeSwitcher from './plan-range-switcher'
|
||||
import Tab from './tab'
|
||||
|
||||
type PlanSwitcherProps = {
|
||||
currentCategory: Category
|
||||
@ -38,15 +38,15 @@ const PlanSwitcher: FC<PlanSwitcherProps> = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='flex w-full justify-center border-t border-divider-accent px-10'>
|
||||
<div className='flex max-w-[1680px] grow items-center justify-between border-x border-divider-accent p-1'>
|
||||
<div className='flex items-center'>
|
||||
<div className="flex w-full justify-center border-t border-divider-accent px-10">
|
||||
<div className="flex max-w-[1680px] grow items-center justify-between border-x border-divider-accent p-1">
|
||||
<div className="flex items-center">
|
||||
<Tab<Category>
|
||||
{...tabs.cloud}
|
||||
isActive={currentCategory === tabs.cloud.value}
|
||||
onClick={onChangeCategory}
|
||||
/>
|
||||
<Divider type='vertical' className='mx-2 h-4 bg-divider-accent' />
|
||||
<Divider type="vertical" className="mx-2 h-4 bg-divider-accent" />
|
||||
<Tab<Category>
|
||||
{...tabs.self}
|
||||
isActive={currentCategory === tabs.self.value}
|
||||
|
||||
@ -21,15 +21,15 @@ const PlanRangeSwitcher: FC<PlanRangeSwitcherProps> = ({
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className='flex items-center justify-end gap-x-3 pr-5'>
|
||||
<div className="flex items-center justify-end gap-x-3 pr-5">
|
||||
<Switch
|
||||
size='l'
|
||||
size="l"
|
||||
defaultValue={value === PlanRange.yearly}
|
||||
onChange={(v) => {
|
||||
onChange(v ? PlanRange.yearly : PlanRange.monthly)
|
||||
}}
|
||||
/>
|
||||
<span className='system-md-regular text-text-tertiary'>
|
||||
<span className="system-md-regular text-text-tertiary">
|
||||
{t('billing.plansCommon.annualBilling', { percent: 17 })}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -22,7 +22,7 @@ const Tab = <T,>({
|
||||
|
||||
return (
|
||||
<div
|
||||
className='flex cursor-pointer items-center justify-center gap-x-2 px-5 py-3'
|
||||
className="flex cursor-pointer items-center justify-center gap-x-2 px-5 py-3"
|
||||
onClick={handleClick}
|
||||
>
|
||||
<Icon isActive={isActive} />
|
||||
|
||||
Reference in New Issue
Block a user