Skip to content

Commit

Permalink
web: Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tbantle22 committed Nov 28, 2023
1 parent effd5df commit 6a12b3f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Loader from "@components/Loader";
import { FaCaretDown } from "@react-icons/all-files/fa/FaCaretDown";
import { FaCaretUp } from "@react-icons/all-files/fa/FaCaretUp";
import cx from "classnames";
import { useEffect, useState } from "react";
import css from "./index.module.css";
import useConfig from "./useConfig";

Expand All @@ -18,7 +19,11 @@ export default function NewConnection(props: Props) {
const { onSubmit, state, setState, error, clearState } = useConfig();
const canSubmit =
state.name && (state.connectionUrl || (state.host && state.username));
const isDocker = location.origin === "http://localhost:3000";
const [isDocker, setIsDocker] = useState(false);

useEffect(() => {
setIsDocker(window.location.origin === "http://localhost:3000");
}, []);

const onCancel = props.canGoBack
? () => {
Expand Down

0 comments on commit 6a12b3f

Please sign in to comment.