Skip to content

Commit

Permalink
fixed bug in counter
Browse files Browse the repository at this point in the history
  • Loading branch information
olesya-aldoshyna-0885 committed Nov 12, 2023
1 parent 88b4a77 commit 1cb464a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Home/Home.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainButton/MainButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { StyledButton } from './MainButton.styled';

const MainButton = ({ to }) => {
return <StyledButton to={to}> main</StyledButton>;
return <StyledButton to={to}> Back</StyledButton>;
};

export default MainButton;
2 changes: 1 addition & 1 deletion src/utils/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1cb464a

Please sign in to comment.