From 0cb8a5c7a9ec72246569376ba1b16ea079270b3e Mon Sep 17 00:00:00 2001 From: Arseniy Sitnikov Date: Fri, 13 Dec 2024 12:17:17 +0300 Subject: [PATCH] fixed auctions and opened them --- frontend/src/.DS_Store | Bin 6148 -> 6148 bytes frontend/src/shared/.DS_Store | Bin 6148 -> 0 bytes frontend/src/shared/Auction/Timer/Timer.tsx | 2 +- .../Clicker/ClickerFooter/ClickerFooter.tsx | 9 ++------- .../shared/Pages/ClickerPage/ClickerPage.tsx | 3 +-- frontend/src/store/auction/actions.ts | 13 ++++++++++--- frontend/src/store/me/actions.ts | 10 ++++++---- frontend/src/utils/isWhiteList.js | 4 +--- 8 files changed, 21 insertions(+), 20 deletions(-) delete mode 100644 frontend/src/shared/.DS_Store diff --git a/frontend/src/.DS_Store b/frontend/src/.DS_Store index 4eef03b9f82fab783f5a196b4c87c1011467a209..c14f32caab1c5d829141b7e8b40b6be8bc43cc6c 100644 GIT binary patch delta 35 pcmZoMXfc@J&&V<{z#2&O$V@!w$jG=^kntPaWCcd`&Fmb1`2oSS3Z?)6 delta 54 zcmZoMXfc@J&&WD4z#2&O$cV8q6f%)xOkC>Pjj0ik~oi2wiq diff --git a/frontend/src/shared/.DS_Store b/frontend/src/shared/.DS_Store deleted file mode 100644 index c4b26bfce6d518890f5a957a44a7d77aeec4e09b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c^3>-rwBBe=5xxc_4EK%|W`2j@IAVpjO>969u_%y~3MMM{>C=D7*_U!sR zx7sPrX8^W3?w^1qfH~a}Umm9B&)p|>R~aMH`HnXXc;A2Q4zI(c`f|d#4|v8AJAD4; z4~NSHWu<@=kOERb3P^#g6!6|ln=cX-rGONW0w)Fh`_Sl)y>Lv7PX|Mc0K^&7VO+;7 zL2RBN_QEld8JZ=Pm{h9~!;;Q?tGZq|CMF$L!-v($RuhWF>3n~Sa#&APlmb%VT!H)C zF1`P6=zq-r=OpcaCN@d9Q8s7rNJc)7`iZ3PZGGVzgs!yd6JA cQPwqI^LZ~E6NAot(24pPa9w0l;MNNK0MOkPcK`qY diff --git a/frontend/src/shared/Auction/Timer/Timer.tsx b/frontend/src/shared/Auction/Timer/Timer.tsx index c373d51..b7cde2f 100644 --- a/frontend/src/shared/Auction/Timer/Timer.tsx +++ b/frontend/src/shared/Auction/Timer/Timer.tsx @@ -35,7 +35,7 @@ export function Timer({initTime}: ITimer) { return (
-

{hour}

+

{hour.toString().length === 1 ? `0${hour}` : hour}

{declension(hour, 'час', 'часа', 'часов')}

diff --git a/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx b/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx index fc9c2e8..cbb4fba 100644 --- a/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx +++ b/frontend/src/shared/Clicker/ClickerFooter/ClickerFooter.tsx @@ -1,17 +1,12 @@ -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; import styles from './clickerfooter.module.css'; import { ClickerBtnFooter } from '../ClickerBtnFooter'; import { EIcons, Icon } from '../../Icons'; import { useNavigate } from 'react-router-dom'; -import { isWhiteList } from '../../../utils/isWhiteList'; export function ClickerFooter() { const navigate = useNavigate(); - const [isDev, setIsDev] = useState(true); - - useEffect(() => { - setIsDev(!isWhiteList()); - }, []); + const [isDev, setIsDev] = useState(false); return (
diff --git a/frontend/src/shared/Pages/ClickerPage/ClickerPage.tsx b/frontend/src/shared/Pages/ClickerPage/ClickerPage.tsx index 8dd080f..c8db46c 100644 --- a/frontend/src/shared/Pages/ClickerPage/ClickerPage.tsx +++ b/frontend/src/shared/Pages/ClickerPage/ClickerPage.tsx @@ -42,9 +42,8 @@ export function ClickerPage({ name, points, img, energy }: IClickerPageInterface const html = document.querySelector('html'); if(html) { - html.style.overflow = 'scroll'; + html.style.overflowY = 'scroll'; } - }, []); useEffect(() => { diff --git a/frontend/src/store/auction/actions.ts b/frontend/src/store/auction/actions.ts index e09970b..b329a18 100644 --- a/frontend/src/store/auction/actions.ts +++ b/frontend/src/store/auction/actions.ts @@ -88,6 +88,7 @@ export const auctionRequestAsync = (): ThunkAction { const user = resp.data; + sessionStorage.setItem('shT', 't'); + sessionStorage.setItem('shL', 't'); axios.get(`${URLClick}/api/v1/energy`, { headers: { //"Content-type": "application/json", @@ -125,8 +127,6 @@ export const meRequestAsync = (): ThunkAction { console.log(err); if (err.response.data.detail) { @@ -203,6 +204,8 @@ export const meRequestAsync = (): ThunkAction { + sessionStorage.setItem('shT', 't'); + sessionStorage.setItem('shL', 't'); const user = resp.data; let avatar = user.avatar; if (!avatar) { @@ -221,8 +224,6 @@ export const meRequestAsync = (): ThunkAction { console.log(err); if (err.response.data.detail) { diff --git a/frontend/src/utils/isWhiteList.js b/frontend/src/utils/isWhiteList.js index 6f40c1e..930407e 100644 --- a/frontend/src/utils/isWhiteList.js +++ b/frontend/src/utils/isWhiteList.js @@ -2,10 +2,8 @@ import { getTgUserId } from "./verification"; export const isWhiteList = () => { let isWhiteList = false; - //123456, const whiteList = [ - 342495217, 6374536117, 322861155, 5219438370, 193428034, 402449803, - 406350282, 1083462027 + //TODO! ]; const userId = Number(getTgUserId());