Skip to content

Commit

Permalink
[GEN-2303]: fix loader for namespace-sources (#2371)
Browse files Browse the repository at this point in the history
This pull request includes changes to the
`frontend/webapp/containers/main/sources/choose-sources/choose-sources-body/choose-sources-body-fast/sources-list/index.tsx`
file to improve the user experience by updating the styling and handling
the loading state for namespaces.

Styling improvements:
* Changed the `NoDataFoundWrapper` component's margin to padding for
better spacing and layout.

User experience improvements:
* Updated the `SourcesList` component to display a loading spinner
(`FadeLoader`) when namespaces are loading, instead of showing the "No
sources available" message.
  • Loading branch information
BenElferink authored Feb 3, 2025
1 parent 1f010bb commit 38bdcec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const SelectionCount = styled(Text)`
`;

const NoDataFoundWrapper = styled.div`
margin: 50px 0;
padding: 50px 0;
display: flex;
flex-direction: column;
align-items: center;
Expand Down Expand Up @@ -150,7 +150,7 @@ export const SourcesList: React.FC<Props> = ({
</RelativeWrapper>
) : (
<NoDataFoundWrapper>
<NoDataFound title='No sources available in this namespace' subTitle='Try searching again or select another namespace.' />
{namespacesLoading ? <FadeLoader scale={1.5} /> : <NoDataFound title='No sources available in this namespace' subTitle='Try searching again or select another namespace.' />}
</NoDataFoundWrapper>
))}
</Group>
Expand Down

0 comments on commit 38bdcec

Please sign in to comment.