diff --git a/.env b/.env new file mode 100644 index 0000000..72d8880 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_SERVICE_ENDPOINT="https://waku.whisperd.tech" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8408432..5bbb756 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "ferry-chat", + "name": "waku-frontend", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ferry-chat", + "name": "waku-frontend", "version": "0.0.0", "dependencies": { "@radix-ui/react-dialog": "^1.0.5", diff --git a/src/App.tsx b/src/App.tsx index 6488c33..42955db 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -43,7 +43,6 @@ interface CommunityMetadata { contentTopic: string; } -const SERVICE_ENDPOINT = "https://waku.whisperd.tech"; const COMMUNITY_CONTENT_TOPIC_PREFIX = "/universal/1/community"; function App() { @@ -58,7 +57,7 @@ function App() { CommunityMetadata[] >([]); const [communityName, setCommunityName] = useState(""); - const [apiEndpoint, setApiEndpoint] = useState(SERVICE_ENDPOINT); + const [apiEndpoint, setApiEndpoint] = useState(import.meta.env.VITE_SERVICE_ENDPOINT); // eslint-disable-next-line @typescript-eslint/no-explicit-any const updateMessage = (e: any) => setNewMessage(e.target.value);