Skip to content

Commit

Permalink
Merge pull request #199 from P4-Games/feature/gamma-styles-4
Browse files Browse the repository at this point in the history
Feature/gamma styles 4
  • Loading branch information
dappsar committed Nov 30, 2023
2 parents cc686a0 + d9a8a5e commit 0b0fba4
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 46 deletions.
42 changes: 24 additions & 18 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,38 @@ import { useLayoutContext } from '../../hooks'

function Footer () {

const { turnNextPage, turnPrevPage } = useLayoutContext()
const { mobile, turnNextPage, turnPrevPage } = useLayoutContext()

const openNewWindow = () => {
window.open('https://tama.nof.town/', '_blank')
}

return (
<div className='footer'>
<div className='footer__insert' onClick={openNewWindow}>
<></>
</div>
<div className='footer__handle__green' onClick={turnPrevPage}>
<></>
</div>
{!mobile &&
<>
<div className='footer__insert' onClick={openNewWindow}>
<></>
</div>
<div className='footer__handle__green' onClick={turnPrevPage}>
<></>
</div>
</>}
<FooterButtons />
<div className='footer__handle__red' onClick={turnNextPage}>
<></>
</div>
<div>
<p className='footer__text'>
Number One Fan &<br />
<br />P4 Tech Solutions <br />
<br />Copyright © 2022 <br />
<br />all rights reserved.
</p>
</div>
{!mobile &&
<>
<div className='footer__handle__red' onClick={turnNextPage}>
<></>
</div>
<div className='footer__text'>
<p>
Number One Fan &<br />
<br />P4 Tech Solutions <br />
<br />Copyright © 2022 <br />
<br />all rights reserved.
</p>
</div>
</>}
</div>
)
}
Expand Down
1 change: 0 additions & 1 deletion src/sections/Gamma/GammaMain.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ const GammaMain = () => {
return
}

console.log(walletAddress)
startLoading()
const result = await finishAlbum(gammaCardsContract, daiContract, walletAddress)
if (result) {
Expand Down
35 changes: 34 additions & 1 deletion src/services/offers.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const getOffersByCardNumber = async (offersContract, cardNumber) => {
timeStamp: item[4]
}))

// El contrato puede devolver una ofer vacia en lugar de null,
// El contrato puede devolver una oferta vacia en lugar de null,
// por lo que quedará el offerId en 0
const filteredResult = offerObject.filter((item) => item.offerId !== 0)
return filteredResult
Expand All @@ -92,3 +92,36 @@ export const getOffersByCardNumber = async (offersContract, cardNumber) => {
throw e
}
}

/*
export const deleteUserOffers = async (offersContract, userAddress) => {
try {
const offers = await offersContract.getOffersByUser(userAddress)
if (!offers) return true
const offerObject = offers.map((item) => ({
offerId: item[0],
offerCard: parseInt(item[1]),
wantedCards: item[2],
offerWallet: item[3],
timeStamp: item[4]
}))
// El contrato puede devolver una oferta vacia en lugar de null,
// por lo que quedará el offerId en 0
const filteredResult = offerObject.filter((item) => item.offerId !== 0)
console.log('user offers', offers, filteredResult)
if (filteredResult && filteredResult.length > 0) {
for (let index = 0; index < filteredResult.length; index++) {
const offer = filteredResult[index]
await offersContract.removeOfferByCardNumber(offer.offerCard)
}
}
return true
} catch (e) {
console.error({ e })
throw e
}
}
*/
66 changes: 53 additions & 13 deletions src/styles/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
background-position: center;
}
@include mobile {
width: 20px;
height: 20px;
width: 40px;
height: 40px;
}
@include tablet {
width: 30px;
height: 30px;
width: 40px;
height: 40px;
}
@include desktop-portrait {
width: 80px;
height: 60px;
width: 40px;
height: 40px;
}
@include mobile-landscape {
width: 20px;
height: 20px;
width: 40px;
height: 40px;
}
@include tablet-landscape {
width: 30px;
height: 30px;
width: 40px;
height: 40px;
}
@include large-desktop {
width: 80px;
Expand Down Expand Up @@ -78,18 +78,23 @@

@include mobile {
display: none;
visibility: hidden;
}
@include tablet {
display: none;
visibility: hidden;
}
@include mobile-landscape {
display: none;
visibility: hidden;
}
@include tablet-landscape {
display: none;
visibility: hidden;
}
@include desktop-portrait {
display: none;
visibility: hidden;
}
@include large-desktop {
width: 160px;
Expand All @@ -104,6 +109,7 @@
justify-content: space-around;

@include mobile {
width: 50%;
justify-content: space-around;
gap: 2%;
}
Expand All @@ -113,6 +119,7 @@
gap: 5%;
}
@include mobile-landscape {
width: 50%;
justify-content: space-around;
gap: 2%;
}
Expand Down Expand Up @@ -185,25 +192,31 @@
width: 250px;
display: flex;
justify-content: space-between;

@include mobile {
width: 0;
visibility: hidden;
display: none;
}
@include tablet {
width: 0;
visibility: hidden;
display: none;
}
@include mobile-landscape {
width: 0;
visibility: hidden;
display: none;
}
@include tablet-landscape {
width: 0;
visibility: hidden;
display: none;
}
@include desktop-portrait {
width: 0;
visibility: hidden;
display: none;
}

&__green {
Expand Down Expand Up @@ -237,19 +250,31 @@
margin-bottom: 100px;
}
}
@include desktop {
width: 218px;
}
@include mobile {
width: 0;
visibility: hidden;
display: none;
}
@include tablet {
width: 0;
visibility: hidden;
display: none;
}
@include mobile-landscape {
width: 0;
visibility: hidden;
display: none;
}
@include tablet-landscape {
width: 0;
visibility: hidden;
display: none;
}
@include desktop-portrait {
width: 0;
visibility: hidden;
}
@include large-desktop {
Expand Down Expand Up @@ -298,41 +323,56 @@
@include mobile {
width: 0;
visibility: hidden;
display: none;
}
@include tablet {
width: 0;
visibility: hidden;
display: none;
}
@include mobile-landscape {
width: 0;
visibility: hidden;
display: none;
}
@include tablet-landscape {
width: 0;
visibility: hidden;
display: none;
}
@include desktop-portrait {
width: 0;
visibility: hidden;
display: none;
}
@include large-desktop {
width: 110px;
height: 100px;
margin-bottom: 100px;
}
@include tablet {
margin-left: 100px;
}
}
}
&__text {
text-align: right;
visibility: hidden;
@include mobile {
width: 0;
display: none;
visibility: hidden;
}
@include mobile-landscape {
width: 0;
display: none;
visibility: hidden;
}
@include tablet {
width: 0;
display: none;
visibility: hidden;
}
@include tablet-landscape {
display: none;
visibility: hidden;
}
@include large-desktop {
width: 160px;
Expand Down
24 changes: 24 additions & 0 deletions src/styles/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
@include tablet {
}
@include tablet-landscape {
Expand Down Expand Up @@ -185,6 +188,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
}
&__text2 {
position: relative;
Expand Down Expand Up @@ -518,6 +524,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
@include tablet {
margin-top: 1%;
}
Expand Down Expand Up @@ -570,6 +579,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
@include tablet {
display: none;
}
Expand Down Expand Up @@ -598,6 +610,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
@include large-desktop {
font-size: 13px;
}
Expand Down Expand Up @@ -632,6 +647,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
.bookimg {
width: 200px;
height: 110px;
Expand All @@ -650,6 +668,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
.coinimg {
position: relative;
height: 50px;
Expand Down Expand Up @@ -778,6 +799,9 @@ $groundHeight: 40px;
@include mobile {
display: none;
}
@include mobile-landscape {
display: none;
}
.techimg {
height: 100%;
width: 100%;
Expand Down
Loading

0 comments on commit 0b0fba4

Please sign in to comment.