diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsx
index 2d44676100..5a9df13771 100644
--- a/web/app/components/explore/sidebar/index.tsx
+++ b/web/app/components/explore/sidebar/index.tsx
@@ -1,14 +1,15 @@
'use client'
-import React, { FC, useEffect, useState } from 'react'
+import type { FC } from 'react'
+import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
-import ExploreContext from '@/context/explore-context'
import cn from 'classnames'
import { useSelectedLayoutSegments } from 'next/navigation'
import Link from 'next/link'
-import Item from './app-nav-item'
-import { fetchInstalledAppList as doFetchInstalledAppList, uninstallApp, updatePinStatus } from '@/service/explore'
import Toast from '../../base/toast'
+import Item from './app-nav-item'
+import { fetchInstalledAppList as doFetchInstalledAppList, uninstallApp, updatePinStatus } from '@/service/explore'
+import ExploreContext from '@/context/explore-context'
import Confirm from '@/app/components/base/confirm'
const SelectedDiscoveryIcon = () => (
@@ -19,12 +20,12 @@ const SelectedDiscoveryIcon = () => (
const DiscoveryIcon = () => (
)
const SideBar: FC<{
- controlUpdateInstalledApps: number,
+ controlUpdateInstalledApps: number
}> = ({
controlUpdateInstalledApps,
}) => {
@@ -35,10 +36,10 @@ const SideBar: FC<{
const { installedApps, setInstalledApps } = useContext(ExploreContext)
const fetchInstalledAppList = async () => {
- const {installed_apps} : any = await doFetchInstalledAppList()
+ const { installed_apps }: any = await doFetchInstalledAppList()
setInstalledApps(installed_apps)
}
-
+
const [showConfirm, setShowConfirm] = useState(false)
const [currId, setCurrId] = useState('')
const handleDelete = async () => {
@@ -47,7 +48,7 @@ const SideBar: FC<{
setShowConfirm(false)
Toast.notify({
type: 'success',
- message: t('common.api.remove')
+ message: t('common.api.remove'),
})
fetchInstalledAppList()
}
@@ -56,7 +57,7 @@ const SideBar: FC<{
await updatePinStatus(id, isPinned)
Toast.notify({
type: 'success',
- message: t('common.api.success')
+ message: t('common.api.success'),
})
fetchInstalledAppList()
}
@@ -74,8 +75,8 @@ const SideBar: FC<{
{isDiscoverySelected ?
:
}
{t('explore.sidebar.discovery')}
@@ -86,12 +87,12 @@ const SideBar: FC<{
{t('explore.sidebar.workspace')}
- {installedApps.map(({id, is_pinned, uninstallable, app : { name, icon, icon_background }}) => {
+ {installedApps.map(({ id, is_pinned, uninstallable, app: { name, icon, icon_background } }) => {
return (
- -
)}
{showConfirm && (
- setShowConfirm(false)}
- onConfirm={handleDelete}
- onCancel={() => setShowConfirm(false)}
- />
- )}
+ setShowConfirm(false)}
+ onConfirm={handleDelete}
+ onCancel={() => setShowConfirm(false)}
+ />
+ )}
)
}