diff --git a/src/components/EndpointDialong.tsx b/src/components/EndpointDialong.tsx index 08df30f..2eb2caf 100644 --- a/src/components/EndpointDialong.tsx +++ b/src/components/EndpointDialong.tsx @@ -13,6 +13,7 @@ import { Zoom, } from "@mui/material"; import SettingsIcon from "@mui/icons-material/Settings"; +import config from "../config"; export interface EndpointDialogProps { endpoint: string; @@ -89,7 +90,7 @@ const EndpointDialog = ({ isValidEndpoint() ? closeTheError() : showTheError(); }} - placeholder="localhost:8080" + placeholder={config.defaultEndpoint} error={error} helperText={errorText} /> diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..c2487f4 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,6 @@ +const config = { + // Change this to whatever you like. I plan to make this easily configurable later. + defaultEndpoint: "localhost:8080" +} + +export default config; diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index f3258d4..50d201b 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -14,6 +14,7 @@ import ReviewField, { ReviewFieldProps } from "../components/ReviewField"; import { useEffect, useState } from "react"; import EndpointDialog from "../components/EndpointDialong"; import PageSwitcher from "../components/PageSwitcher"; +import config from "../config"; interface HomeProps { endpoint: string;