import * as React from 'react'; import Container from '@mui/material/Container'; import Typography from '@mui/material/Typography'; import Box from '@mui/material/Box'; import Link from '@mui/material/Link'; import ProTip from './ProTip'; function Copyright() { return ( {'Copyright © '} Your Website {' '} {new Date().getFullYear()} {'.'} ); } const topicUrl = (baseUrl, topic) => `${baseUrl}/${topic}`; const shortUrl = (url) => url.replaceAll(/https?:\/\//g, ""); const shortTopicUrl = (baseUrl, topic) => shortUrl(topicUrl(baseUrl, topic)) function SubscriptionList(props) { return (
{props.subscriptions.map(subscription => )}
); } function SubscriptionItem(props) { return (
{shortTopicUrl(props.base_url, props.topic)}
); } function NotificationList(props) { return (
{props.notifications.map(notification => )}
{props.timestamp}
{props.message}
); } function NotificationItem(props) { return (
{props.time}
{props.message}
); } export default function App() { const subscriptions = [ {base_url: "https://ntfy.sh", topic: "mytopic"}, {base_url: "https://ntfy.sh", topic: "phils_alerts"}, ]; const notifications = [ {id: "qGrfmhp3vK", times: 1645193395, message: "Message 1"}, {id: "m4YYjfxwyT", times: 1645193428, message: "Message 2"} ]; return ( ntfy ); }