Add footer version and live post error guard
This commit is contained in:
parent
15141835f2
commit
9e4483954f
|
|
@ -241,6 +241,7 @@ export default function App() {
|
|||
<footer className="sw-footer">
|
||||
<div className="sw-footer-inner">
|
||||
<div className="sw-footer-brand">SOCIOWIRE</div>
|
||||
<div className="sw-footer-brand">© Sociowire v0.0001</div>
|
||||
<nav className="sw-footer-nav" aria-label="Site">
|
||||
<a href="/">Home</a>
|
||||
<a href="/#map">Live Map</a>
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ export default function LiveKitBroadcast({ coords, onClose, onStreamCreated }) {
|
|||
}, [localStream]);
|
||||
|
||||
const handleGoLive = useCallback(async () => {
|
||||
if (!authToken) {
|
||||
alert("Please log in to start a live stream.");
|
||||
return;
|
||||
}
|
||||
if (!title.trim()) {
|
||||
alert("Please enter a title");
|
||||
return;
|
||||
|
|
@ -115,9 +119,14 @@ export default function LiveKitBroadcast({ coords, onClose, onStreamCreated }) {
|
|||
const post = await res.json();
|
||||
setLivePostId(post?.id || null);
|
||||
window.dispatchEvent(new CustomEvent("live-post-created", { detail: post }));
|
||||
} else {
|
||||
const errText = await res.text();
|
||||
console.error("[LiveKit] Failed to create live post:", res.status, errText);
|
||||
alert("Live started, but we couldn't create the live post.");
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("[LiveKit] Failed to create live post:", err);
|
||||
alert("Live started, but we couldn't create the live post.");
|
||||
}
|
||||
}, [title, localStream, startBroadcast, roomName, coords, onStreamCreated, authToken, username]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue