From 6cf41b4a5c55c91974e31ac032d969c7481b3e80 Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 22 May 2024 14:59:24 -0400 Subject: extract frontend --- app/javascript/components/Layout.jsx | 60 ------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 app/javascript/components/Layout.jsx (limited to 'app/javascript/components/Layout.jsx') diff --git a/app/javascript/components/Layout.jsx b/app/javascript/components/Layout.jsx deleted file mode 100644 index 79e7813..0000000 --- a/app/javascript/components/Layout.jsx +++ /dev/null @@ -1,60 +0,0 @@ -import React from "react"; -import { Outlet, Link } from "react-router-dom"; -import Button from "./Button"; -export default function Layout ({userData}) -{ - console.log(userData); - //const [userData, setUserData] = useState({ name: "" }); - - // if the user tries to access the isolated domain then we redirect them - // this is NOT done for security, only for good UX - // rails serves the react app no matter what - // so the app would be broken when served on the isolated domain - const domain = window.location.host; - console.log(domain); - if(domain === "localhost:3000") - { - window.location.replace("http://127.0.0.1:3000"); - } - - return ( - <> -
- - -
-
-
-
-
-
-
- - - ) -}; -- cgit v1.2.3