From a3a30a0ab680e4744892c15990e9df9968552c8d Mon Sep 17 00:00:00 2001 From: Liam Arbuckle Date: Tue, 20 Feb 2024 23:50:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B5=F0=9F=8F=BB=E2=80=8D=E2=99=80?= =?UTF-8?q?=EF=B8=8F=F0=9F=8C=93=20=E2=86=9D=20Wrong=20Geebleryarn=20dev?= =?UTF-8?q?=20[=20SGV2-6=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Section/Layout.tsx | 2 +- package.json | 1 + pages/index.tsx | 176 +++++++++++++++++++++++----------- pages/planets/[id].tsx | 2 +- pages/planets/map.tsx | 2 +- tailwind.config.js | 2 +- yarn.lock | 34 ++++++- 7 files changed, 156 insertions(+), 63 deletions(-) diff --git a/components/Section/Layout.tsx b/components/Section/Layout.tsx index aac91e0a..3836d0d1 100644 --- a/components/Section/Layout.tsx +++ b/components/Section/Layout.tsx @@ -28,7 +28,7 @@ const Layout: React.FC = ({ children }) => {
- {children} + {children}
)} diff --git a/package.json b/package.json index 96e0d5fc..487463cc 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "react-dom": "18.2.0", "react-hook-form": "^7.48.2", "react-icons": "^5.0.1", + "react-responsive": "^9.0.2", "react-spinners": "^0.13.8", "styled-components": "^6.1.8", "tailwind-merge": "^2.0.0", diff --git a/pages/index.tsx b/pages/index.tsx index f4c976af..7e4e5550 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -2,6 +2,7 @@ import { useSession, useSupabaseClient } from "@supabase/auth-helpers-react"; import React, { useEffect, useState } from "react"; import Layout, { LayoutNoNav } from "../components/Section/Layout"; import { useRouter } from "next/router"; +import { useMediaQuery } from 'react-responsive'; import { Metadata } from "next"; @@ -45,68 +46,127 @@ export function PublicLanding() { setShowFeedOverlay(true); }; + const isDesktopOrLaptop = useMediaQuery({ query: '(min-width: 1224px)' }); + const isTabletOrMobile = useMediaQuery({ query: '(max-width: 1224px)' }); + if (session) { return ( - -
- - -
- {showFeedOverlay && ( - <> -
- setShowFeedOverlay(false)} /> -
- - )} -
-
+ +
+ + + +
+
+ {isDesktopOrLaptop && ( + <> + Planet 1 + Planet 2 + + )} + {isTabletOrMobile && ( + <> + Planet 1 + Planet 2 + + )} +
+
+
+
+
+
You need to pick a planet!
+
+
+
You've got 5 new deposits to explore
+
+
+
A dust storm is brewing on your home planet,
time to investigate.
+
+
+
+ {/* Content here */} +
+
+ {showFeedOverlay && ( + <> +
+ setShowFeedOverlay(false)} /> +
+ + )} +
+
+ {/* Menu Button */} + {!showFeedOverlay && ( + + )}
- ); + ); + + }; return ( diff --git a/pages/planets/[id].tsx b/pages/planets/[id].tsx index 12d0c4dd..552a0e63 100644 --- a/pages/planets/[id].tsx +++ b/pages/planets/[id].tsx @@ -46,7 +46,7 @@ export default function PlanetIdPage () { }, []); if (!id) { - return null; + return null; }; return ( diff --git a/pages/planets/map.tsx b/pages/planets/map.tsx index 38cb4106..74e194fc 100644 --- a/pages/planets/map.tsx +++ b/pages/planets/map.tsx @@ -6,7 +6,7 @@ import Layout, { LayoutNoNav } from "../../components/Section/Layout"; export default function GardenPage() { return ( - + {/* */}I think I can ) } \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index c8c1e51b..636b13f8 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -82,5 +82,5 @@ module.exports = { '1': '1', }, }, - plugins: [require("tailwindcss-animate", "daisyui")], + plugins: [require("daisyui")], }; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 7fc95eba..61d94dfa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2698,6 +2698,11 @@ css-color-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" integrity sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg== +css-mediaquery@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/css-mediaquery/-/css-mediaquery-0.1.2.tgz#6a2c37344928618631c54bd33cedd301da18bea0" + integrity sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q== + css-selector-tokenizer@^0.8: version "0.8.0" resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz#88267ef6238e64f2215ea2764b3e2cf498b845dd" @@ -4215,6 +4220,11 @@ human-signals@^4.3.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +hyphenate-style-name@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" + integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== + ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -4922,6 +4932,13 @@ markdown-table@^1.1.3: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== +matchmediaquery@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/matchmediaquery/-/matchmediaquery-0.3.1.tgz#8247edc47e499ebb7c58f62a9ff9ccf5b815c6d7" + integrity sha512-Hlk20WQHRIm9EE9luN1kjRjYXAQToHOIAHPJn9buxBwuhfTHoKUcX+lXBbxc85DVQfXYbEQ4HcwQdd128E3qHQ== + dependencies: + css-mediaquery "^0.1.2" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -5829,7 +5846,7 @@ prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.6.1, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -5971,6 +5988,16 @@ react-remove-scroll@2.5.5: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" +react-responsive@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/react-responsive/-/react-responsive-9.0.2.tgz#34531ca77a61e7a8775714016d21241df7e4205c" + integrity sha512-+4CCab7z8G8glgJoRjAwocsgsv6VA2w7JPxFWHRc7kvz8mec1/K5LutNC2MG28Mn8mu6+bu04XZxHv5gyfT7xQ== + dependencies: + hyphenate-style-name "^1.0.0" + matchmediaquery "^0.3.0" + prop-types "^15.6.1" + shallow-equal "^1.2.1" + react-spinners@^0.13.8: version "0.13.8" resolved "https://registry.yarnpkg.com/react-spinners/-/react-spinners-0.13.8.tgz#5262571be0f745d86bbd49a1e6b49f9f9cb19acc" @@ -6375,6 +6402,11 @@ sha1@^1.1.1: charenc ">= 0.0.1" crypt ">= 0.0.1" +shallow-equal@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.2.1.tgz#4c16abfa56043aa20d050324efa68940b0da79da" + integrity sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA== + shallowequal@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"