diff --git a/src/components/HomePage.jsx b/src/components/HomePage.jsx index 1d13823..a37cf87 100644 --- a/src/components/HomePage.jsx +++ b/src/components/HomePage.jsx @@ -15,6 +15,14 @@ import { HomePageSubTitle, HomePageTitle, } from '../data/TextContent'; +import { ReactComponent as GlobeSVG } from '../data/svg/globe.svg'; + +const newWebsiteURL = () => { + const url = new URL(window.location.href) + url.hostname = 'whatstherush.earth' + url.port = '' + return url +} export default function HomePage() { return ( @@ -37,7 +45,7 @@ export default function HomePage() { > + +

+ + {"RUSH is moving to the next stage of our development, come check out the improvements we've made at: "} + whatstherush.earth +

+

This website will soon permenantly redirect to the new website, but don't worry, all your links and QR codes will still work.

+
); + const newWebsiteURL = () => { + const oldURL = new URL(getShareURL()) + const path = oldURL.pathname.split('/') + const geo = { + latLng: path.at(-1), + zoom: path.at(-2), + question: path.at(-3), + } + console.log(path) + console.log(geo) + + const url = new URL(oldURL) + url.hostname = 'whatstherush.earth' + url.port = '' + if (geo.question === 'undefined' || geo.question === undefined) { + url.pathname = path.includes('app') ? 'app' : '' + url.search = '' + } else { + url.pathname = `/app/${geo.question}` + url.search = new URLSearchParams({ + zoom: geo.zoom, + lat: geo.latLng.split(',')[0], + lng: geo.latLng.split(',')[1] + }).toString() + } + return url + } + + const NewWebsiteButton = () => { + const { isOpen, onOpen, onClose } = useDisclosure() + const [ newURL, setNewURL ] = useState('https://whatstherush.earth/') + return ( + <> + + + + + New Website + + +

+ + {"RUSH is moving to the next stage of our development, come check out the improvements we've made at: "} +

+ + whatstherush.earth + +

This website will soon permenantly redirect to the new website, but don't worry, all your links and QR codes will still work.

+
+
+
+ + ) + } + const menuBurgerButtons = useBreakpointValue({ base: ( // smallest mobile phones contain all buttons + menu that spans the entire screen. + + + {mapButton} @@ -165,12 +255,16 @@ export default function NavBar(props) { ), sm: ( - {mapButton}{aboutButton}{menuBurger} + {}{mapButton}{aboutButton}{menuBurger} ), lg: ( - {mapButton}{aboutButton}{feedbackButton}{instagramButton}{shareButton} + {}{ + + + + }{mapButton}{aboutButton}{feedbackButton}{instagramButton}{shareButton} ), },{ssr:false}); diff --git a/src/data/svg/globe.svg b/src/data/svg/globe.svg new file mode 100644 index 0000000..3f60dfd --- /dev/null +++ b/src/data/svg/globe.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file