From ee9a4e9f144f6525dc4d0b0403442a5664ce9faf Mon Sep 17 00:00:00 2001 From: Lamarcke Date: Tue, 22 Oct 2024 09:34:15 -0300 Subject: [PATCH 1/2] - Fixes some layout issues - Adds a support us CTA in navbar --- .../general/shell/GlobalShellFooter.tsx | 7 +--- .../GlobalShellHeader/GlobalShellHeader.tsx | 4 +-- .../GlobalShellNavbar/GlobalShellNavbar.tsx | 33 ++++++++++++++----- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/components/general/shell/GlobalShellFooter.tsx b/src/components/general/shell/GlobalShellFooter.tsx index 85b0770..2195a87 100755 --- a/src/components/general/shell/GlobalShellFooter.tsx +++ b/src/components/general/shell/GlobalShellFooter.tsx @@ -19,12 +19,7 @@ type IFooterLink = { href: string; label: string; external?: boolean }; const links: IFooterLink[] = [ { label: "About", href: "/about" }, { label: "Privacy", href: "/privacy" }, - { label: "Terms of Service", href: "/tos" }, - { - label: "Donate", - href: "https://patreon.com/GameNodeApp", - external: true, - }, + { label: "Terms", href: "/tos" }, ]; const GlobalShellFooter = () => { diff --git a/src/components/general/shell/GlobalShellHeader/GlobalShellHeader.tsx b/src/components/general/shell/GlobalShellHeader/GlobalShellHeader.tsx index 0f37de2..8311b36 100755 --- a/src/components/general/shell/GlobalShellHeader/GlobalShellHeader.tsx +++ b/src/components/general/shell/GlobalShellHeader/GlobalShellHeader.tsx @@ -16,8 +16,6 @@ export default function GlobalShellHeader({ toggleSidebar, }: IGlobalShellHeaderProps) { const userId = useUserId(); - const [preferencesModalOpened, preferencesModalUtils] = - useDisclosure(false); return (
- + diff --git a/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx b/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx index 2c35484..993635a 100755 --- a/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx +++ b/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx @@ -1,6 +1,7 @@ import { AppShell, Box, + Divider, Group, ScrollArea, Stack, @@ -17,6 +18,8 @@ import { IconUserShield, IconSettings, IconLogout, + IconHeart, + IconHeartFilled, } from "@tabler/icons-react"; import { UserButton } from "@/components/general/input/UserButton/UserButton"; import Link from "next/link"; @@ -145,28 +148,42 @@ export default function GlobalShellNavbar({ - {isLoggedIn && ( -
+
+ {isLoggedIn && ( - + Settings + )} + + + + Support us + + + {isLoggedIn && ( Logout -
- )} + )} +
); } From 83fa92967985e1957cc95eb8c762c94a8f0105c0 Mon Sep 17 00:00:00 2001 From: Lamarcke Date: Tue, 22 Oct 2024 10:03:57 -0300 Subject: [PATCH 2/2] - Fixes spacing issue with collection ordering select - Fixes issue where order is not updated when selecting the same item --- .../view/CollectionEntriesView.tsx | 36 +++++++++++-------- .../input/select/SelectWithOrdering.tsx | 30 +++++++++------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/src/components/collection/collection-entry/view/CollectionEntriesView.tsx b/src/components/collection/collection-entry/view/CollectionEntriesView.tsx index 27adb29..97b6bd1 100644 --- a/src/components/collection/collection-entry/view/CollectionEntriesView.tsx +++ b/src/components/collection/collection-entry/view/CollectionEntriesView.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo, useState } from "react"; import { CollectionEntry, Game } from "@/wrapper/server"; -import { Skeleton, Stack } from "@mantine/core"; +import { Flex, Skeleton, Stack } from "@mantine/core"; import GameView from "@/components/game/view/GameView"; import CenteredLoading from "@/components/general/CenteredLoading"; import { Box, Space } from "@mantine/core"; @@ -53,21 +53,27 @@ const CollectionEntriesView = ({ mt={"md"} > - - - + + + + + + {isLoading && buildLoadingSkeletons()} diff --git a/src/components/general/input/select/SelectWithOrdering.tsx b/src/components/general/input/select/SelectWithOrdering.tsx index a019cfe..7967bd3 100644 --- a/src/components/general/input/select/SelectWithOrdering.tsx +++ b/src/components/general/input/select/SelectWithOrdering.tsx @@ -2,7 +2,8 @@ import React, { useState } from "react"; import { Group, Select, SelectProps, Text } from "@mantine/core"; import { IconSortAscending, IconSortDescending } from "@tabler/icons-react"; -interface Props extends Omit { +interface Props + extends Omit { defaultValue: string; onChange: (value: string, order: "ASC" | "DESC") => void; } @@ -23,28 +24,31 @@ const SelectWithOrdering = ({ "ASC" | "DESC" >("DESC"); + console.log(internalSelectedItem, internalSelectedOrdering); + return (