Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix profile page flow
Browse files Browse the repository at this point in the history
  • Loading branch information
tthttl committed Apr 16, 2023
1 parent 058401f commit b23ee05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion components/mumbles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export const Mumbles: FC<MumblesProps> = ({
hasMore={hasMore}
loader={<Skeleton />}
endMessage={
isEndMessageNeeded && (
isEndMessageNeeded &&
!!mumbles.length && (
<CardWrapper
titel="Yaay, du hast alle mumbles gesehen!"
src={noMoreMumblesPicture}
Expand Down
12 changes: 7 additions & 5 deletions pages/profile/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export default function ProfilePage() {
<div className="my-4 md:h-[35rem]">
<Skeleton isProfile={true} />
</div>
<Skeleton />
</>
) : (
<div className="my-4">
Expand Down Expand Up @@ -210,19 +209,22 @@ export default function ProfilePage() {
)}
{profileState.context.isOwnProfile &&
!profileState.context.isNewUserProfile &&
!!profileState.context.likedPosts.length && (
profileState.matches('idle') && (
<Toggle
isToggleOn={profileState.context.isPostsOpen}
onClick={toggle}
onLabel="Deine Mumbles"
offLabel="Deine Likes"
/>
)}
{!profileState.context.posts.length && profileState.matches('idle') && (
{((profileState.matches('idle') &&
profileState.context.isPostsOpen &&
!profileState.context.posts.length) ||
(!profileState.context.isPostsOpen &&
!profileState.context.likedPosts.length)) && (
<CardWrapper titel="Keine Mumbles gefunden" src={noMumblesPicture} />
)}
{!profileState.context.posts.length ||
profileState.matches('loadPostsAndLikedPosts') ||
{profileState.matches('loadPostsAndLikedPosts') ||
profileState.matches('loadPosts') ? (
<>
<Skeleton />
Expand Down

1 comment on commit b23ee05

@vercel
Copy link

@vercel vercel bot commented on b23ee05 Apr 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.