fix: Ensure last app is displayed when no filtered apps are found (#6090)

* fix: Ensure last app is displayed when no filtered apps are found

* fix: Remove Empty component from AppsPage when no apps are found

---------

Co-authored-by: George Zhao <georgezhao@SKJLAB>
This commit is contained in:
George Zhao 2025-05-17 17:27:45 +08:00 committed by GitHub
parent 3ce7929979
commit fe45a68260

View File

@ -1,7 +1,7 @@
import { Navbar, NavbarCenter } from '@renderer/components/app/Navbar'
import { Center } from '@renderer/components/Layout'
import { useMinapps } from '@renderer/hooks/useMinapps'
import { Empty, Input } from 'antd'
import { Input } from 'antd'
import { isEmpty } from 'lodash'
import { Search } from 'lucide-react'
import React, { FC, useState } from 'react'
@ -53,7 +53,7 @@ const AppsPage: FC = () => {
<ContentContainer id="content-container">
{isEmpty(filteredApps) ? (
<Center>
<Empty />
<App isLast app={filteredApps[0]} />
</Center>
) : (
<AppsContainer style={{ height: containerHeight }}>