Untitled
unknown
plain_text
2 years ago
1.0 kB
10
Indexable
// popups.tsx import { useState } from "react" import { sendToBackground } from "@plasmohq/messaging" import { log } from "console" function backgroundInfo() { async function request() { const response = await sendToBackground({name: "current_user",body: {id:"cnmimiohhcoajnfhehehahlkpdgjhmbe"}}) return response } const runeRequest = async () => { const response = await request() return response } return (runeRequest)() } function IndexPopup() { const [data, setData] = useState("") return ( <div style={{ padding: 16 }}> <h2> Welcome to your {`${backgroundInfo()}`} <a href="https://www.plasmo.com" target="_blank"> Plasmo </a>{" "} Extension! </h2> <input onChange={(e) => setData(e.target.value)} value={data} /> <a href="https://docs.plasmo.com" target="_blank"> View Docs </a> </div> ) } export default IndexPopup
Editor is loading...
Leave a Comment