chore: formatting

This commit is contained in:
2023-12-11 12:20:53 +00:00
parent d5944d5239
commit cd51e508b7
3 changed files with 78 additions and 70 deletions

View File

@ -131,7 +131,9 @@ export function LiveChat({
case -1: case -1:
case -2: { case -2: {
return ( return (
<b className="border px-3 py-2 text-center border-gray-2 rounded-xl bg-primary uppercase" key={`${a.kind}-${a.created_at}`}> <b
className="border px-3 py-2 text-center border-gray-2 rounded-xl bg-primary uppercase"
key={`${a.kind}-${a.created_at}`}>
{a.kind === -1 ? ( {a.kind === -1 ? (
<FormattedMessage defaultMessage="Stream Started" id="5tM0VD" /> <FormattedMessage defaultMessage="Stream Started" id="5tM0VD" />
) : ( ) : (

View File

@ -108,11 +108,11 @@ export default function LiveVideoPlayer({
video.current.onpause = () => setPlayState("paused"); video.current.onpause = () => setPlayState("paused");
video.current.onseeking = () => { video.current.onseeking = () => {
if (video.current?.paused) { if (video.current?.paused) {
setPlayState("paused") setPlayState("paused");
} else { } else {
setPlayState("loading") setPlayState("loading");
}
} }
};
video.current.onplay = () => setPlayState("loading"); video.current.onplay = () => setPlayState("loading");
video.current.onvolumechange = () => setVolume(video.current?.volume ?? 1); video.current.onvolumechange = () => setVolume(video.current?.volume ?? 1);
video.current.ontimeupdate = () => setPosition(video.current?.currentTime); video.current.ontimeupdate = () => setPosition(video.current?.currentTime);
@ -165,7 +165,8 @@ export default function LiveVideoPlayer({
} }
function playerOverlay() { function playerOverlay() {
return <> return (
<>
{status === VideoStatus.Online && ( {status === VideoStatus.Online && (
<div <div
className="absolute opacity-0 hover:opacity-90 transition-opacity w-full h-full z-20 bg-[#00000055]" className="absolute opacity-0 hover:opacity-90 transition-opacity w-full h-full z-20 bg-[#00000055]"
@ -235,6 +236,7 @@ export default function LiveVideoPlayer({
</div> </div>
)} )}
</> </>
);
} }
return ( return (
<div className="relative"> <div className="relative">

View File

@ -10,5 +10,9 @@ interface MentionProps {
export function Mention({ pubkey }: MentionProps) { export function Mention({ pubkey }: MentionProps) {
const user = useUserProfile(pubkey); const user = useUserProfile(pubkey);
const npub = hexToBech32("npub", pubkey); const npub = hexToBech32("npub", pubkey);
return <Link to={`/p/${npub}`} className="text-primary">{user?.name || pubkey}</Link>; return (
<Link to={`/p/${npub}`} className="text-primary">
{user?.name || pubkey}
</Link>
);
} }