Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 80x 80x 79x | import { BugReportFormData } from "components/Navigation/ReportButton"; import { ReportBugReq, ScreenResolution } from "proto/bugs_pb"; import client from "./client"; export async function reportBug({ description, results, subject, }: BugReportFormData) { const req = new ReportBugReq(); const screenResolution = new ScreenResolution(); screenResolution.setWidth(window.innerWidth); screenResolution.setHeight(window.innerHeight); req.setSubject(subject); req.setDescription(description); req.setResults(results); req.setFrontendVersion(process.env.NEXT_PUBLIC_VERSION); req.setUserAgent(navigator.userAgent); req.setScreenResolution(screenResolution); req.setPage(window.location.href); const res = await client.bugs.reportBug(req); return res.toObject(); } |