Skip to content

Commit

Permalink
host based redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed Oct 22, 2023
1 parent e66fa78 commit 1f07687
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import heroBG from "./ai-generated.jpg";
// import heroBG from "./ai-generated.jpg";
import "./App.css";
import Lottie from "lottie-react";
import creature1 from "./creature1.json";
import creature2 from "./creature2.json";
import creature3 from "./creature3.json";
import creature4 from "./creature4.json";
// import creature4 from "./creature4.json";
import waves from "./waves.json";

import particle2 from "./particle2.json";
Expand All @@ -24,9 +24,11 @@ function App() {
const handleConnect = () => {
connect({
modalMode: "alwaysAsk",
}).then(resp =>
window.location.href = 'http://localhost:5173/'
);
}).then(resp => {
window.location.href = window.location.href.indexOf("localhost") === -1 ?
'/game' :
'http://localhost:5173/';
});
}

return (
Expand Down

0 comments on commit 1f07687

Please sign in to comment.