Przeglądaj źródła

Fix: eslint (#1030)

tags/0.3.19
KVOJJJin 2 lat temu
rodzic
commit
934def5fcc
No account linked to committer's email address

+ 6
- 2
web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/page.tsx Wyświetl plik

import ChartView from './chartView' import ChartView from './chartView'
import CardView from './cardView' import CardView from './cardView'
import { getLocaleOnServer } from '@/i18n/server' import { getLocaleOnServer } from '@/i18n/server'
import { useTranslation } from '@/i18n/i18next-serverside-config'
import { useTranslation as translate } from '@/i18n/i18next-serverside-config'
import ApikeyInfoPanel from '@/app/components/app/overview/apikey-info-panel' import ApikeyInfoPanel from '@/app/components/app/overview/apikey-info-panel'


export type IDevelopProps = { export type IDevelopProps = {
params: { appId }, params: { appId },
}: IDevelopProps) => { }: IDevelopProps) => {
const locale = getLocaleOnServer() const locale = getLocaleOnServer()
const { t } = await useTranslation(locale, 'app-overview')
/*
rename useTranslation to avoid lint error
please check: https://github.com/i18next/next-13-app-dir-i18next-example/issues/24
*/
const { t } = await translate(locale, 'app-overview')
return ( return (
<div className="h-full px-16 py-6 overflow-scroll"> <div className="h-full px-16 py-6 overflow-scroll">
<ApikeyInfoPanel /> <ApikeyInfoPanel />

+ 3
- 2
web/app/components/base/notion-page-selector/page-selector/index.tsx Wyświetl plik

} }
} }


const Item = memo(({ index, style, data }: ListChildComponentProps<{
const ItemComponent = ({ index, style, data }: ListChildComponentProps<{
dataList: NotionPageItem[] dataList: NotionPageItem[]
handleToggle: (index: number) => void handleToggle: (index: number) => void
checkedIds: Set<string> checkedIds: Set<string>
} }
</div> </div>
) )
}, areEqual)
}
const Item = memo(ItemComponent, areEqual)


const PageSelector = ({ const PageSelector = ({
value, value,

+ 3
- 2
web/app/components/datasets/documents/detail/completed/index.tsx Wyświetl plik

/** /**
* Show all the contents of the segment * Show all the contents of the segment
*/ */
export const SegmentDetail: FC<ISegmentDetailProps> = memo(({
const SegmentDetailComponent: FC<ISegmentDetailProps> = ({
segInfo, segInfo,
archived, archived,
onChangeSwitch, onChangeSwitch,
</div> </div>
</div> </div>
) )
})
}
export const SegmentDetail = memo(SegmentDetailComponent)


export const splitArray = (arr: any[], size = 3) => { export const splitArray = (arr: any[], size = 3) => {
if (!arr || !arr.length) if (!arr || !arr.length)

+ 3
- 3
web/app/components/datasets/documents/detail/new-segment-modal.tsx Wyświetl plik

onSave: () => void onSave: () => void
} }


const NewSegmentModal: FC<NewSegmentModalProps> = memo(({
const NewSegmentModal: FC<NewSegmentModalProps> = ({
isShow, isShow,
onCancel, onCancel,
docForm, docForm,
</div> </div>
</Modal> </Modal>
) )
})
}


export default NewSegmentModal
export default memo(NewSegmentModal)

Ładowanie…
Anuluj
Zapisz