From fc6c10718a633f0439b3aac045d4537c58bc7c6e Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 19 Jun 2024 19:41:29 -0400 Subject: add small changes --- index.html | 2 +- public/favicon.ico | Bin 0 -> 15406 bytes src/components/Apps.tsx | 30 ++++++++++++++++++++++++++++++ src/components/CloseWindow.tsx | 9 ++++++++- src/components/Home.tsx | 2 -- src/components/Layout.tsx | 5 +++-- src/routes/index.tsx | 2 ++ 7 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 public/favicon.ico create mode 100644 src/components/Apps.tsx diff --git a/index.html b/index.html index 05f8cfd..d06e497 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + Adam M. diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..cae3062 Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/components/Apps.tsx b/src/components/Apps.tsx new file mode 100644 index 0000000..e4dea26 --- /dev/null +++ b/src/components/Apps.tsx @@ -0,0 +1,30 @@ +import { useState, useEffect } from "react"; +//import { Link } from "react-router-dom"; +//import GameCard from "./GameCard"; +//import Button from "./Button"; +//import { GameType } from "../types"; + + +export default function Apps () { + //const [games, setGames] = useState([]); + + + return( + <> +
+
+
Apps
+
+
+
+
+
+

Game Holster

+

This is a work in progress thingie

+

talk about your app here

+
+
+
+ + ); +} diff --git a/src/components/CloseWindow.tsx b/src/components/CloseWindow.tsx index 40c5962..bb33e0a 100644 --- a/src/components/CloseWindow.tsx +++ b/src/components/CloseWindow.tsx @@ -1,10 +1,17 @@ //import { Link } from "react-router-dom"; //export default () => ( -export default function Home () { +export default function CloseWindow () { + // trigger localStorage listener in other tabs. + // this forces react rerender where required. localStorage.setItem("logged in trigger", String(Math.random())); + // close window once done window.close(); + + // window can only be closed if it was opened by javascript. + // if the window was opened by a user then just redirect to + // the home page instead. window.location.replace("/"); return( diff --git a/src/components/Home.tsx b/src/components/Home.tsx index 7430549..ec15c9b 100644 --- a/src/components/Home.tsx +++ b/src/components/Home.tsx @@ -1,6 +1,4 @@ -//import { Link } from "react-router-dom"; -//export default () => ( export default function Home () { return( <> diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index fc50468..3d3747d 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -16,11 +16,12 @@ export default function Layout ({userData}: userData)