Skip to content

Commit 2bdfacb

Browse files
committed
add env var for hostname
1 parent cb57996 commit 2bdfacb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pcweb/pages/docs/custom_components.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import reflex as rx
22
import httpx
33
import json
4+
import os
45
from rxconfig import config
56
import reflex_chakra as rc
67
from pcweb.templates.docpage import docpage, h1_comp, text_comp_2
@@ -21,7 +22,9 @@ class CustomComponentGalleryState(rx.State):
2122
@rx.event
2223
def fetch_components_list(self):
2324
try:
24-
response = httpx.get(f"{config.cp_backend_url}/custom-components/gallery")
25+
response = httpx.get(
26+
f"{os.getenv("RCC_ENDPOINT")}/custom-components/gallery"
27+
)
2528
response.raise_for_status()
2629
component_list = response.json()
2730
except (httpx.HTTPError, json.JSONDecodeError) as ex:

0 commit comments

Comments
 (0)