@@ -19,6 +19,7 @@ import { useManageInstance } from "@/lib/queries/instance/manageInstance";
1919import { Instance } from "@/types/evolution.types" ;
2020
2121import { NewInstance } from "./NewInstance" ;
22+ import { TooltipWrapper } from "@/components/ui/tooltip" ;
2223
2324function Dashboard ( ) {
2425 const { t } = useTranslation ( ) ;
@@ -114,15 +115,20 @@ function Dashboard() {
114115 </ div >
115116 < main className = "grid gap-6 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4" >
116117 { filteredInstances . length > 0 &&
117- Array . isArray ( instances ) &&
118- instances . map ( ( instance : Instance ) => (
118+ Array . isArray ( filteredInstances ) ? (
119+ filteredInstances . map ( ( instance : Instance ) => (
119120 < Card key = { instance . id } >
120121 < CardHeader >
121122 < Link to = { `/manager/instance/${ instance . id } /dashboard` } className = "flex w-full flex-row items-center justify-between gap-4" >
122- < h3 className = "text-wrap font-semibold" > { instance . name } </ h3 >
123- < Button variant = "ghost" size = "icon" >
124- < Cog className = "card-icon" size = "20" />
125- </ Button >
123+ < TooltipWrapper content = { instance . name } side = "top" >
124+ < h3 className = "text-wrap font-semibold truncate" > { instance . name } </ h3 >
125+ </ TooltipWrapper >
126+
127+ < TooltipWrapper content = { t ( "dashboard.settings" ) } side = "top" >
128+ < Button variant = "ghost" size = "icon" >
129+ < Cog className = "card-icon" size = "20" />
130+ </ Button >
131+ </ TooltipWrapper >
126132 </ Link >
127133 </ CardHeader >
128134 < CardContent className = "flex-1 space-y-6" >
@@ -161,7 +167,9 @@ function Dashboard() {
161167 </ Button >
162168 </ CardFooter >
163169 </ Card >
164- ) ) }
170+ ) ) ) :(
171+ < p > { t ( "dashboard.instancesNotFound" ) } </ p >
172+ ) }
165173 </ main >
166174
167175 { ! ! deleteConfirmation && (
0 commit comments