UNPKG

salat

Version:

Daily Moroccan prayers time, right in your console, at the tip of your fingers

11 lines (10 loc) 1.06 kB
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime"; import { Box, Text } from "ink"; import citiesData from "../data/cities.json" with { type: "json" }; const CitiesApp = () => { const cities = citiesData; // Sort cities alphabetically const sortedCities = [...cities].sort((a, b) => a.frenchName.localeCompare(b.frenchName)); return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { bold: true, color: "cyan", children: ["\uD83C\uDF0D Available Cities in Morocco (", cities.length, ")"] }) }), _jsx(Box, { flexDirection: "row", flexWrap: "wrap", children: sortedCities.map((city) => (_jsxs(Box, { width: 25, marginBottom: 0, children: [_jsx(Text, { color: "gray", children: "- " }), _jsx(Text, { children: city.frenchName })] }, city.id))) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "gray", children: ["Tip: Use these names with the 'times' command, e.g., 'salat times", " ", sortedCities[0]?.frenchName, "'"] }) })] })); }; export default CitiesApp;