Skip to content

Commit

Permalink
fix error reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Valeraom committed Oct 26, 2024
1 parent 87c5264 commit f714799
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
38 changes: 18 additions & 20 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,26 @@
}
}

@media print, screen and (min-width: 769px) {
.tile:not(.is-child) {
display: flex;
}
}

.tile.is-ancestor:last-child {
margin-bottom: -.75rem;
}

.tile.is-ancestor {
margin-left: -.75rem;
margin-right: -.75rem;
margin-top: -.75rem;
}

.tile {
align-items: stretch;
min-height: min-content;
flex-basis: 0;
flex-grow: 1;
flex-shrink: 1;
flex: 1 1 0;

&.is-ancestor {
margin-left: -0.75rem;
margin-right: -0.75rem;
margin-top: -0.75rem;

&:last-child {
margin-bottom: -0.75rem;
}
}

@media print, screen and (min-width: 769px) {
&:not(.is-child) {
display: flex;
}
}
}

.message-body {
Expand All @@ -51,4 +49,4 @@
margin: 0 auto;
position: relative;
width: auto;
}
}
1 change: 1 addition & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/indent */
import 'bulma/css/bulma.css';
import '@fortawesome/fontawesome-free/css/all.css';
import cn from 'classnames';
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useComments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const useComments = (selectedPostId: number) => {
const [isLoading, setIsLoading] = useState(false);

const loadComments = () => {
setErrorMessage('');
setIsLoading(true);

commentsService
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/usePosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const usePosts = (selectedUserId: number = 0) => {
return;
}

setErrorMessage('');

postsService
.getUserPosts(selectedUserId)
.then(setPosts)
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/useUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const useUsers = () => {
const [errorMessage, setErrorMessage] = useState('');

const loadUsers = () => {
setErrorMessage('');

usersService
.getUsers()
.then(res => {
Expand Down

0 comments on commit f714799

Please sign in to comment.