Skip to content

Commit

Permalink
add empty spans
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliavas committed Jul 6, 2023
1 parent 56252b1 commit b9111fa
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
20 changes: 18 additions & 2 deletions frontend/src/pages/desktop/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,23 @@ export const ProfileView: react.FC = () => {
</div>
<div className="posts__container-profile">
{
type == 'fetching' ?
<div style={{
display: 'flex',
justifyContent: 'center',
marginTop: 20
}}>
<Puff
height={80}
width={80}
radius={1}
color={'#FE754D'}
/>
</div> :
posts.length ?
posts.map((e) => {
return <Post {...e}/>
})
}) : <span style={{textAlign: 'center', color: '#504D62', fontWeight: 'bold'}}>No posts yet</span>
}
</div>

Expand Down Expand Up @@ -555,7 +569,9 @@ const Subs: react.FC = () => {

return <div className='subs__container'>
{
followings.map(e => <ExtendedProfile {...e}/>)
followings.length ?
followings.map(e => <ExtendedProfile {...e}/>):
<span style={{textAlign: 'center', color: '#504D62', fontWeight: 'bold'}}>You don't subscribe to any author</span>
}
</div>
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/pages/desktop/profile/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ const ProfilePosts: react.FC = () => {

return <>
{
posts.map(e => <Post {...e}/>)
posts.length ?
posts.map(e => <Post {...e}/>) :
<span style={{textAlign: 'center', color: '#504D62', fontWeight: 'bold'}}>No posts yet</span>
}
</>
}
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/elements/post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ import { makeDonate } from '../../../client/makeDonation';
import {useSelector} from 'react-redux';
import { profileSelector } from '../../../store/profile';
import {Avatar, message} from 'antd';
import { useNavigate } from 'react-router-dom';


const AuthorPost: react.FC<IDataShortProfile & {timestamp: string}> = (props) => {
const navigate = useNavigate();
return <div className='author__container'>
<div className="author">
<div className="author" onClick={() => {
navigate('/user/'+props.fullWallet)
}}>
<Avatar src={props.imageUrl} size={40}/>
<span>{props.name}</span>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/elements/post/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
}

.author>img{
Expand Down

0 comments on commit b9111fa

Please sign in to comment.