From 1cb464af08ff41496991dd0b67fc5e2e22c73c65 Mon Sep 17 00:00:00 2001 From: Olesya Aldoshyna Date: Sun, 12 Nov 2023 22:44:57 +0200 Subject: [PATCH] fixed bug in counter --- src/components/Home/Home.styled.js | 2 +- src/components/MainButton/MainButton.jsx | 2 +- src/utils/backend.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Home/Home.styled.js b/src/components/Home/Home.styled.js index d06747e..44d90ef 100644 --- a/src/components/Home/Home.styled.js +++ b/src/components/Home/Home.styled.js @@ -8,7 +8,7 @@ export const Wrapper = styled.h1` margin-right: -50%; transform: translate(-50%, -50%); text-align: center; - color: #333; + color: red; margin-bottom: 2rem; animation: fadeIn 2s ease-in-out; diff --git a/src/components/MainButton/MainButton.jsx b/src/components/MainButton/MainButton.jsx index bd34d14..648699e 100644 --- a/src/components/MainButton/MainButton.jsx +++ b/src/components/MainButton/MainButton.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { StyledButton } from './MainButton.styled'; const MainButton = ({ to }) => { - return main; + return Back; }; export default MainButton; diff --git a/src/utils/backend.js b/src/utils/backend.js index 462f5ae..c45a0f4 100644 --- a/src/utils/backend.js +++ b/src/utils/backend.js @@ -14,7 +14,7 @@ export async function updateFollowers(userId, action) { const response = await axios.get(url); const user = response.data; - const updatedFollowers = action === "increment" ? user.followers + 1 : user.followers - 1; + const updatedFollowers = action === "increment" ? user.followers - 1 : user.followers + 1; const data = await axios.put(url, { ...user, followers: updatedFollowers }); return data.data; } catch (err) {