When i use the fetch data in image props,it's response the error:failed to pipe response.
My code like this:
app.frame("/", async (c) => {
const { buttonValue, inputText, status } = c;
console.log(buttonValue, inputText, status);
const { data } = await getMyLiveGame(
"0xa6ECB6dAf9Ed05764230Bf118B0705d85508f48c"
);
console.log(data, "data");
return c.res({
// action: "/result",
image: (
<div
style={{
width: "100%",
height: "100%",
background: "#000",
display: "flex",
justifyContent: "center",
alignItems: "center",
flexDirection: "column",
color: "#fff",
padding: "1rem",
fontSize: "2rem",
}}
>
<div>0000</div>
<div>{data?.end || "8888"}</div>
</div>
),
intents: [
// <TextInput placeholder="Enter custom fruit..." />,
<Button.Transaction target="/play/left">Support Left</Button.Transaction>,
<Button.Transaction target="/play/right">
Support Right
</Button.Transaction>,
<Button>Refresh</Button>,
],
});
});