diff --git a/src/Router.tsx b/src/Router.tsx index 8cf53dc..b6c86a8 100644 --- a/src/Router.tsx +++ b/src/Router.tsx @@ -94,6 +94,10 @@ const DeletePlayer = lazy( () => import(/* webpackChunkName: 'delete-player */ './pages/self-service/DeletePlayer'), ) +const selfServiceRouteElements = [ + } />, +] + type RouterProps = { intendedRoute: string | null } @@ -117,7 +121,7 @@ function Router({ intendedRoute }: RouterProps) { } /> } /> - } /> + {selfServiceRouteElements} } /> @@ -189,6 +193,8 @@ function Router({ intendedRoute }: RouterProps) { )} + {selfServiceRouteElements} + } /> diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 5654901..4b59c1f 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,155 +1,156 @@ -import { useLocation } from 'react-router-dom' +import { HideForSelfService } from './HideForSelfService' import Link from './Link' export default function Footer() { - const location = useLocation() - if (location.pathname.startsWith('/manage/')) { - return null - } - return ( -
-
-
- © Talo Platform Ltd {new Date().getFullYear()} -

Self-funded and independent

- - About us - -
+ +
+
+
+ © Talo Platform Ltd {new Date().getFullYear()} +

Self-funded and independent

+ + About us + +
-
-

Contact us

-
    -
  • - Discord -
  • -
  • - Email -
  • -
  • - Twitter -
  • -
  • - Bluesky -
  • -
+
+

Contact us

+
    +
  • + Discord +
  • +
  • + Email +
  • +
  • + Twitter +
  • +
  • + Bluesky +
  • +
+
-
-
-

Features

-
    -
  • - - Player management - -
  • -
  • - - Event tracking - -
  • -
  • - - Leaderboards - -
  • -
  • - - Game channels - -
  • -
  • - - Game saves - -
  • -
  • - - Game stats - -
  • -
  • - - Game feedback - -
  • -
  • - - Live config - -
  • -
  • - - Player relationships - -
  • -
  • - - Open source - -
  • -
-
- -
-

Integrations

+

Features

  • - - Steamworks integration + + Player management
  • - - Unity package + + Event tracking
  • - - Godot plugin + + Leaderboards
  • -
-
- -
-

Links

-
  • - GitHub + + Game channels +
  • - Docs + + Game saves +
  • - Blog + + Game stats +
  • - - Showcase + + Game feedback
  • - - Pricing + + Live config
  • - - Privacy + + Player relationships
  • - - Terms + + Open source
-
-
+ +
+
+

Integrations

+
    +
  • + + Steamworks integration + +
  • +
  • + + Unity package + +
  • +
  • + + Godot plugin + +
  • +
+
+ +
+

Links

+
    +
  • + GitHub +
  • +
  • + + Docs + +
  • +
  • + + Blog + +
  • +
  • + + Showcase + +
  • +
  • + + Pricing + +
  • +
  • + + Privacy + +
  • +
  • + + Terms + +
  • +
+
+
+
+ ) } diff --git a/src/components/HideForSelfService.tsx b/src/components/HideForSelfService.tsx new file mode 100644 index 0000000..1e447de --- /dev/null +++ b/src/components/HideForSelfService.tsx @@ -0,0 +1,12 @@ +import { ReactNode } from 'react' +import { useLocation } from 'react-router-dom' + +export function HideForSelfService({ children }: { children: ReactNode }) { + const location = useLocation() + + if (location.pathname.startsWith('/manage/')) { + return null + } + + return children +} diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index eb0a754..9e43479 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -7,6 +7,7 @@ import routes from '../constants/routes' import activeGameState from '../state/activeGameState' import Button from './Button' import GameSwitcher from './GameSwitcher' +import { HideForSelfService } from './HideForSelfService' import Link from './Link' import LinkButton from './LinkButton' import MobileMenu from './MobileMenu' @@ -49,24 +50,26 @@ export default function NavBar() { ) return ( - + ) } diff --git a/src/components/UnauthedContainer.tsx b/src/components/UnauthedContainer.tsx index 7bea804..d686cff 100644 --- a/src/components/UnauthedContainer.tsx +++ b/src/components/UnauthedContainer.tsx @@ -1,7 +1,16 @@ +import { clsx } from 'clsx' import { ReactNode } from 'react' -export function UnauthedContainer({ children }: { children: ReactNode }) { +export function UnauthedContainer({ + children, + className, +}: { + children: ReactNode + className?: string +}) { return ( -
{children}
+
+ {children} +
) } diff --git a/src/components/UnauthedContainerInner.tsx b/src/components/UnauthedContainerInner.tsx index 7e05c5f..2ddcbd6 100644 --- a/src/components/UnauthedContainerInner.tsx +++ b/src/components/UnauthedContainerInner.tsx @@ -5,17 +5,18 @@ import { unauthedContainerStyle } from '../styles/theme' type Props = { as?: T children: ReactNode -} & Omit, 'as' | 'children' | 'className'> +} & Omit, 'as' | 'children'> export function UnauthedContainerInner({ as: As, children, + className, ...props }: Props) { const Tag = As ?? 'div' return ( - + {children} ) diff --git a/src/pages/self-service/DeletePlayer.tsx b/src/pages/self-service/DeletePlayer.tsx index a1d7f89..a9aa1c8 100644 --- a/src/pages/self-service/DeletePlayer.tsx +++ b/src/pages/self-service/DeletePlayer.tsx @@ -37,7 +37,7 @@ export default function DeletePlayer() { if (loading) { return ( - +