import {ReactElement, useState} from "react"; import NotificationConnector from "../api/NotificationConnector"; import Loader from "../Loader"; import ILunaseaRecord from "../types/records/ILunaseaRecord"; export function LunaseaItem ({apiUri} : {apiUri: string}) : ReactElement{ const [record, setRecord] = useState({ id: "" }); const [loading, setLoading] = useState(false); return
setRecord({...record, id: e.currentTarget.value})} />
<>
; } const regex = new RegExp("(?:device|user)\/[0-9a-zA-Z\-]+"); function Validate(record: ILunaseaRecord) : boolean { return regex.test(record.id); }