Skip to content

Commit 633f388

Browse files
committed
Refactor MikuMikuBeamComponent and WaifuRoulettePrizeItem for improved functionality and styling
- Updated MikuMikuBeamComponent to conditionally invoke message deletion based on ticker visibility. - Reformatted styles in WaifuRoulettePrizeItem for better readability and consistency.
1 parent 3a00604 commit 633f388

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/components/OBS_Components/MikuMikuBeam/MikuMikuBeamComponent.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ const MikuMikuBeamComponent = () => {
9191

9292
// Показываем бегущие строки в нужный временной интервал
9393
if (currentTime >= TICKER_START_TIME && currentTime <= TICKER_END_TIME) {
94+
if (!showTickers) {
95+
TelegramusHubSignalRContext.invoke("MikuMikuDeleteTwitchMessages");
96+
}
9497
setShowTickers(true);
95-
debugger;
96-
TelegramusHubSignalRContext.invoke("MikuMikuDeleteTwitchMessages");
9798
} else {
9899
setShowTickers(false);
99100
}
100-
}, []);
101+
}, [showTickers]);
101102

102103
// Обработчик завершения видео
103104
const handleVideoEnded = useCallback(() => {

src/components/OBS_Components/WaifuAlerts/components/WaifuRoulettePrizeItem.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export default function WaifuRoulettePrizeItem({
1818
return (
1919
<figure
2020
className={styles.figure}
21-
style={{ width: `${PRIZE_ITEM_WIDTH}px`, height: `${PRIZE_ITEM_HEIGHT}px` }}
21+
style={{
22+
width: `${PRIZE_ITEM_WIDTH}px`,
23+
height: `${PRIZE_ITEM_HEIGHT}px`,
24+
}}
2225
>
2326
<div className={styles.inner}>
2427
<img

0 commit comments

Comments
 (0)