danmu-sim/app/danmu/current-input.tsx

14 lines
315 B
TypeScript
Raw Permalink Normal View History

2024-04-07 04:25:19 +08:00
"use client";
import { useContext } from "react";
import { DanmuContext } from "./provider";
export default function CurrentInput() {
const state = useContext(DanmuContext);
return (
<div className="input">
{state.songName ?? ""} {state.songId ? "-" : ""} {state.songArtist ?? ""}
</div>
);
}