refactor(web): mark Props of plugins/ components as read-only (#25219) (#37303)

This commit is contained in:
Rohit Gahlawat
2026-06-11 00:18:00 +00:00
committed by GitHub
parent ffeccfff0c
commit e07c50c83f
76 changed files with 152 additions and 152 deletions
@@ -8,7 +8,7 @@ import MarketplaceItem from '../item/marketplace-item'
import PackageItem from '../item/package-item'
import { getPluginKey, useInstallMultiState } from './hooks/use-install-multi-state'
type Props = {
type Props = Readonly<{
allPlugins: Dependency[]
selectedPlugins: Plugin[]
onSelect: (plugin: Plugin, selectedIndex: number, allCanInstallPluginsLength: number) => void
@@ -17,7 +17,7 @@ type Props = {
onLoadedAllPlugin: (installedInfo: Record<string, VersionInfo>) => void
isFromMarketPlace?: boolean
ref?: React.Ref<ExposeRefs>
}
}>
export type ExposeRefs = {
selectAllPlugins: () => void
@@ -22,14 +22,14 @@ import InstallMulti from './install-multi'
const i18nPrefix = 'installModal'
type Props = {
type Props = Readonly<{
allPlugins: Dependency[]
onStartToInstall?: () => void
onInstalled: (plugins: Plugin[], installStatus: InstallStatus[]) => void
onCancel: () => void
isFromMarketPlace?: boolean
isHideButton?: boolean
}
}>
const Install: FC<Props> = ({
allPlugins,
@@ -9,12 +9,12 @@ import Card from '@/app/components/plugins/card'
import { MARKETPLACE_API_PREFIX } from '@/config'
import useGetIcon from '../../base/use-get-icon'
type Props = {
type Props = Readonly<{
list: Plugin[]
installStatus: InstallStatus[]
onCancel: () => void
isHideButton?: boolean
}
}>
const Installed: FC<Props> = ({
list,