fix: fall back to about:blank in the iframe, not the state
This commit is contained in:
parent
f558399da4
commit
59cadac430
|
@ -45,7 +45,7 @@ export function BrowserStateProvider({
|
|||
}: {
|
||||
children: React.ReactElement;
|
||||
}) {
|
||||
const [url, setUrl] = useState("about:blank");
|
||||
const [url, setUrl] = useState("");
|
||||
|
||||
return (
|
||||
<BrowserStateContext.Provider value={{ url, setUrl }}>
|
||||
|
@ -190,5 +190,10 @@ export function Browser() {
|
|||
boot(status, auth);
|
||||
}, []);
|
||||
|
||||
return <iframe src={`/browse/${url}`} className="w-full h-full"></iframe>;
|
||||
return (
|
||||
<iframe
|
||||
src={url ? `/browse/${url}` : "about:blank"}
|
||||
className="w-full h-full"
|
||||
></iframe>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue