Skip to content

Commit

Permalink
Merge pull request #113 from P4-Games/fix/some-styles-fixes
Browse files Browse the repository at this point in the history
Fix/some styles fixes
  • Loading branch information
dappsar authored Nov 15, 2023
2 parents b4b22c3 + a068329 commit a174bc9
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/components/Footer/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
position: relative;
transition: transform 0.3s ease; /* Add transition for smooth scaling */
transform-origin: center center; /* Set scaling origin to center */
cursor: pointer;

&:hover {
transform: scale(1.1); /* Scale the element on hover */
Expand Down
18 changes: 12 additions & 6 deletions src/components/Navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ function Navbar ({

useEffect(() => {
setPage(window.history.state.url)
window.history.state.url == '/alpha' ? setMidButton('Albums') : null
window.history.state.url == '/gamma' ? setMidButton('Inventory') : null
}, [])

setMidButton(t('collections'))
if (window.history.state.url.endsWith('/alpha')) {
setMidButton('Albums')
} else if (window.history.state.url.endsWith('/gamma')) {
setMidButton('Inventory')
}
console.log('page', page, page.endsWith('/alpha'))
}, [page])


const audioHandleClick = () => {
Expand Down Expand Up @@ -75,9 +81,9 @@ function Navbar ({
>
<button
onClick={() => {
if (page == '/alpha') {
if (page.endsWith('/alpha')) {
alphaMidButton()
} else if (page == '/gamma') {
} else if (page.endsWith('/gamma')) {
if (cardInfo) {
setCardInfo(false)
setInventory(true)
Expand All @@ -90,7 +96,7 @@ function Navbar ({
}}
className='navbar__ul__li__contacto'
>
{t ? t('collections') : midButton}
{midButton}
</button>
</LinkScroll>
<Whitepaper />
Expand Down
6 changes: 6 additions & 0 deletions src/pages/admin.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Head from 'next/head'
import React from 'react'
import { adminAccounts } from '../config'
import {serverSideTranslations} from 'next-i18next/serverSideTranslations'
Expand All @@ -11,6 +12,11 @@ const Admin = React.forwardRef(() => {

return (
<div className='admincontainer'>
<Head>
<title>Number One Fan</title>
<meta name='description' content='NoF Alpha' />
<link rel='icon' href='/favicon.ico' />
</Head>
{!walletAddress && <div className='main_buttons_container'>
<button
className='alpha_button alpha_main_button'
Expand Down
15 changes: 14 additions & 1 deletion src/pages/gamma.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
import Head from 'next/head'
import GammaInventory from '../sections/Gamma'
import {serverSideTranslations} from 'next-i18next/serverSideTranslations'

const Gamma = () => <GammaInventory />
const Gamma = () => {
return (
<div className='gamma_main'>
<Head>
<title>Number One Fan</title>
<meta name='description' content='NoF Gamma' />
<link rel='icon' href='/favicon.ico' />
</Head>
<GammaInventory />
</div>
)
}


export default Gamma

Expand Down
1 change: 0 additions & 1 deletion src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function Home () {
)
}


export default Home

export async function getStaticProps ({locale}) {
Expand Down
1 change: 0 additions & 1 deletion src/sections/Gamma/GammaInfoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const GammaInfoCard = React.forwardRef((props, book) => {
}

const verifyUserHasCard = async () => {
// console.log('called verify')
try {
const result = await hasCard(gammaCardsContract, imageNumber)
setUserHasCard(result)
Expand Down
27 changes: 11 additions & 16 deletions src/sections/Gamma/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import GammaInfoCard from './GammaInfoCard'
import Swal from 'sweetalert2'
import {useTranslation} from 'next-i18next'

import CustomImage from '../../components/customImage'
import Navbar from '../../components/Navbar'
import Footer from '../../components/Footer'
import GammaAlbumInventory from './GammaAlbumInventory'
Expand Down Expand Up @@ -215,6 +216,15 @@ const index = React.forwardRef(() => {

return (
<>
<Navbar
walletAddress={walletAddress}
cardInfo={cardInfo}
setCardInfo={setCardInfo}
inventory={inventory}
setInventory={setInventory}
handleBuyPackClick={handleBuyPackClick}
/>

{!walletAddress && <div className='alpha'>
<div className='main_buttons_container'>
<button
Expand Down Expand Up @@ -262,15 +272,6 @@ const index = React.forwardRef(() => {
</div>
}

<Navbar
walletAddress={walletAddress}
cardInfo={cardInfo}
setCardInfo={setCardInfo}
inventory={inventory}
setInventory={setInventory}
handleBuyPackClick={handleBuyPackClick}
/>

{walletAddress && <div className='gamma_main'>
{packIsOpen && <GammaPack
loaderPack={loaderPack}
Expand All @@ -279,15 +280,9 @@ const index = React.forwardRef(() => {
setOpenPackage={setOpenPackage}
openPackage={openPackage}
/>}
<Head>
<title>Number One Fan</title>
<meta name='description' content='NoF Gamma' />
<link rel='icon' href='/favicon.ico' />
</Head>

<div className='hero__top'>
{!mobile && inventory &&
<img
<CustomImage
alt='albums' src='/gamma/albums.png'
onClick={() => setInventory(false)} className='gammaAlbums'
/>
Expand Down

0 comments on commit a174bc9

Please sign in to comment.