mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 13:40:24 +02:00
initial implementation for lyrics
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { useMemo } from 'react';
|
||||
import { LyricLine } from '/@/renderer/features/lyrics/lyric-line';
|
||||
|
||||
interface UnsynchronizedLyricsProps {
|
||||
lyrics: string;
|
||||
}
|
||||
|
||||
export const UnsynchronizedLyrics = ({ lyrics }: UnsynchronizedLyricsProps) => {
|
||||
const lines = useMemo(() => {
|
||||
return lyrics.split('\n');
|
||||
}, [lyrics]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{lines.map((text, idx) => (
|
||||
<LyricLine
|
||||
key={idx}
|
||||
active={false}
|
||||
id={`lyric-${idx}`}
|
||||
lyric={text}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user