1+ < < << << < HEAD
12import { useEffect , useState , useCallback } from "react" ;
23import { Button } from "@/components/ui/button" ;
34import "./style.css" ;
@@ -186,6 +187,66 @@ function DashboardInstance() {
186187 </ Button >
187188 </ div >
188189 </ div >
190+ =======
191+ import { Button } from "@/components/ui/button";
192+ import "./style.css";
193+ import { Card , CardContent , CardHeader , CardTitle } from "@/components/ui/card";
194+ import { useInstance } from "@/contexts/InstanceContext";
195+
196+ function DashboardInstance() {
197+ const { instance } = useInstance ( ) ;
198+
199+ const renderStatus = ( status : string | undefined ) => {
200+ switch ( status ) {
201+ case "open" :
202+ return (
203+ < div className = "dashboard-status" >
204+ < i className = "status-icon connected" > </ i >
205+ < span className = "status-text" > CONECTADO</ span >
206+ </ div >
207+ ) ;
208+ case "connecting" :
209+ return (
210+ < div className = "dashboard-status" >
211+ < i className = "status-icon connecting" > </ i >
212+ < span className = "status-text" > CONECTANDO</ span >
213+ </ div >
214+ ) ;
215+ case "closed" :
216+ return (
217+ < div className = "dashboard-status" >
218+ < i className = "status-icon disconnected" > </ i >
219+ < span className = "status-text" > DESCONECTADO</ span >
220+ </ div >
221+ ) ;
222+ default :
223+ return (
224+ < div className = "dashboard-status" >
225+ < i className = "status-icon disconnected" > </ i >
226+ < span className = "status-text" > DESCONECTADO</ span >
227+ </ div >
228+ ) ;
229+ }
230+ } ;
231+
232+ return (
233+ < >
234+ < main className = "dashboard-instance" >
235+ < div className = "dashboard-card" >
236+ < div className = "dashboard-info" >
237+ { renderStatus ( instance ?. connectionStatus ) }
238+ < div className = "dashboard-name" > { instance ?. name } </ div >
239+ </ div >
240+ < div className = "dashboard-actions" >
241+ < Button className = "action-button" > REINICIAR</ Button >
242+ < Button className = "action-button disabled" > DESCONECTAR</ Button >
243+ </ div >
244+ </ div >
245+ < div className = "connection-warning" >
246+ < span > Telefone não conectado</ span >
247+ < Button className = "connect-button" > CONECTAR</ Button >
248+ </ div >
249+ >>> >>> > 4 cc9370dbfe3c7a3d271f87e6e12747f59f42392
189250 </ main >
190251 < main className = "instance-cards" >
191252 < Card className = "instance-card" >
@@ -207,9 +268,12 @@ function DashboardInstance() {
207268 < CardContent > 0</ CardContent >
208269 </ Card >
209270 </ main >
271+ < < << << < HEAD
210272 { showQRCode && (
211273 < QRCodePopup qrCodeData = { qrCodeData } onClose = { closeQRCodePopup } />
212274 ) }
275+ = === ===
276+ >>> >>> > 4cc9370dbfe3c7a3d271f87e6e12747f59f42392
213277 </ >
214278 );
215279}
0 commit comments