SavedTimezones.tsx (754B)
1 import React from "react"; 2 3 import ShowSavedZones from "./ShowSavedZones"; 4 5 import { getSavedZones } from "../../utils"; 6 7 import { IMoment } from "../../utils/interfaces"; 8 9 function SavedTimezones({ time }: IMoment): JSX.Element { 10 const savedZones = getSavedZones(); 11 return ( 12 <div className="saved"> 13 {savedZones.length > 0 ? ( 14 <ShowSavedZones savedZones={savedZones} time={time} /> 15 ) : ( 16 <h5 17 className="border-top mt-5 text-center" 18 style={{ paddingTop: "1rem" }} 19 > 20 You haven't saved any timezones so far.{" "} 21 <span aria-label="Saved list is empty." role="img"> 22 😅 23 </span> 24 </h5> 25 )} 26 </div> 27 ); 28 } 29 30 export default SavedTimezones;