Skip to content

Commit

Permalink
feat: game version switch buttons (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkcy3 authored Dec 9, 2024
1 parent 6e8770d commit 962b7d2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
Binary file added public/anno117-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/anno1800-icon.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { auth } from '@/auth'
import { MobileNavbar } from '@/components/layout/MobileNavbar'
import { NotificationDropdownButton } from '@/components/layout/NotificationDropdownButton'
import { UserDropdownButton } from '@/components/layout/UserDropdownButton'
import { VersionButtons } from '@/components/layout/VersionButtons'
import {
Button,
Container,
Expand Down Expand Up @@ -155,6 +156,9 @@ const Navbar = () => {
return (
<header>
<Container className="py-0">
<div className="max-md:hidden">
<VersionButtons />
</div>
<NavbarRoot>
<MobileNavbar socials={<SocialIcons />}>
{navigation.map((item) => (
Expand Down
16 changes: 2 additions & 14 deletions src/components/layout/MobileNavbar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use client'

import Image from 'next/image'
import { useState } from 'react'

import {
Link,
MobileSidebar,
NavbarItem,
OpenMenuIcon,
Expand All @@ -15,7 +13,7 @@ import {
SidebarSection,
} from '@/components/ui'

import logo from '../../../public/anno-stamps-logo.png'
import { VersionButtons } from './VersionButtons'

export const MobileNavbar = ({
children,
Expand All @@ -34,17 +32,7 @@ export const MobileNavbar = ({
<MobileSidebar close={() => setIsOpen(false)} open={isOpen}>
<Sidebar>
<SidebarHeader>
<Link href="/" id="header-logo">
<Image
alt="Anno Stamps"
src={logo}
style={{
height: 'auto',
maxWidth: '160px',
width: '100%',
}}
/>
</Link>
<VersionButtons />
</SidebarHeader>
<SidebarBody>
<SidebarSection>{children}</SidebarSection>
Expand Down
27 changes: 27 additions & 0 deletions src/components/layout/VersionButtons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'use client'

import Image from 'next/image'

import anno117 from '../../../public/anno117-icon.jpg'
import anno1800 from '../../../public/anno1800-icon.webp'
import { Button } from '../ui'

export const VersionButtons = () => {
return (
<div className="29px py-1">
<Button disabled plain>
<Image alt="anno 117 logo icon" height={20} src={anno117} width={20} />
Soon
</Button>
<Button href="/" plain>
<Image
alt="anno 1800 logo icon"
height={20}
src={anno1800}
width={20}
/>
1800
</Button>
</div>
)
}

0 comments on commit 962b7d2

Please sign in to comment.