diff options
Diffstat (limited to 'src/frontend/app/components')
| -rw-r--r-- | src/frontend/app/components/TimetableTable.tsx | 18 | ||||
| -rw-r--r-- | src/frontend/app/components/UpdateNotification.tsx | 63 |
2 files changed, 8 insertions, 73 deletions
diff --git a/src/frontend/app/components/TimetableTable.tsx b/src/frontend/app/components/TimetableTable.tsx index d03ddf4..86896ca 100644 --- a/src/frontend/app/components/TimetableTable.tsx +++ b/src/frontend/app/components/TimetableTable.tsx @@ -144,16 +144,14 @@ export const TimetableTable: React.FC<TimetableTableProps> = ({ </div> </div> <div className="card-body"> - {!isPast && ( - <div className="route-streets"> - <span className="service-id"> - {parseServiceId(entry.trip.service_id)} - </span> - {entry.next_streets.length > 0 && ( - <span> — {entry.next_streets.join(' — ')}</span> - )} - </div> - )} + <div className="route-streets"> + <span className="service-id"> + {parseServiceId(entry.trip.service_id)} + </span> + {entry.next_streets.length > 0 && ( + <span> — {entry.next_streets.join(' — ')}</span> + )} + </div> </div> </div> ); diff --git a/src/frontend/app/components/UpdateNotification.tsx b/src/frontend/app/components/UpdateNotification.tsx deleted file mode 100644 index c8e21ea..0000000 --- a/src/frontend/app/components/UpdateNotification.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { useState, useEffect } from "react"; -import { Download, X } from "lucide-react"; -import { swManager } from "../utils/serviceWorkerManager"; -import "./UpdateNotification.css"; - -export function UpdateNotification() { - const [showUpdate, setShowUpdate] = useState(false); - const [isUpdating, setIsUpdating] = useState(false); - - useEffect(() => { - swManager.onUpdate(() => { - setShowUpdate(true); - }); - }, []); - - const handleUpdate = async () => { - setIsUpdating(true); - swManager.activateUpdate(); - - // Wait for the page to reload - setTimeout(() => { - window.location.reload(); - }, 500); - }; - - const handleDismiss = () => { - setShowUpdate(false); - }; - - if (!showUpdate) return null; - - return ( - <div className="update-notification"> - <div className="update-content"> - <div className="update-icon"> - <Download size={20} /> - </div> - <div className="update-text"> - <div className="update-title">Nueva versión disponible</div> - <div className="update-description"> - Actualiza para obtener las últimas mejoras - </div> - </div> - <div className="update-actions"> - <button - className="update-button" - onClick={handleUpdate} - disabled={isUpdating} - > - {isUpdating ? "Actualizando..." : "Actualizar"} - </button> - <button - className="update-dismiss" - onClick={handleDismiss} - aria-label="Cerrar notificación" - > - <X size={16} /> - </button> - </div> - </div> - </div> - ); -} |
