Fix missing getEventURL function in connection banner (#2557)

After a previous PR replaced `getEventURL` with `getBackendURL`, the banner
code was not updated, leading to problems rendering the connection banner.
This commit is contained in:
Masen Furer 2024-02-08 11:53:38 -08:00 committed by GitHub
parent 601dd34792
commit 7fb9747fa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,7 +34,8 @@ class WebsocketTargetURL(Bare):
def _get_imports(self) -> imports.ImportDict: def _get_imports(self) -> imports.ImportDict:
return { return {
"/utils/state.js": [imports.ImportVar(tag="getEventURL")], "/utils/state.js": [imports.ImportVar(tag="getBackendURL")],
"/env.json": [imports.ImportVar(tag="env", is_default=True)],
} }
@classmethod @classmethod
@ -44,7 +45,7 @@ class WebsocketTargetURL(Bare):
Returns: Returns:
The websocket target URL component. The websocket target URL component.
""" """
return super().create(contents="{getEventURL().href}") return super().create(contents="{getBackendURL(env.EVENT).href}")
def default_connection_error() -> list[str | Var | Component]: def default_connection_error() -> list[str | Var | Component]: