Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(website): fix showcase search input #9260

Merged
merged 2 commits into from Sep 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions website/src/pages/showcase/index.tsx
Expand Up @@ -282,7 +282,6 @@ function ShowcaseCards() {
</Translate>
</Heading>
<FavoriteIcon svgClass={styles.svgIconFavorite} />
<SearchBar />
</div>
<ul
className={clsx(
Expand Down Expand Up @@ -313,9 +312,7 @@ function ShowcaseCards() {
className={clsx(
'margin-bottom--md',
styles.showcaseFavoriteHeader,
)}>
<SearchBar />
</div>
)} />
<ul className={clsx('clean-list', styles.showcaseList)}>
{filteredUsers.map((user) => (
<ShowcaseCard key={user.title} user={user} />
Expand All @@ -328,11 +325,19 @@ function ShowcaseCards() {
}

export default function Showcase(): JSX.Element {
const filteredUsers = useFilteredUsers();
return (
<Layout title={TITLE} description={DESCRIPTION}>
<main className="margin-vert--lg">
<ShowcaseHeader />
<ShowcaseFilters />
{filteredUsers.length !== 0 && (
<div
style={{display: 'flex', marginLeft: 'auto'}}
className="container">
<SearchBar />
</div>
)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is good. The <SearchBar> should remain the same either if there are results or not.

<ShowcaseCards />
</main>
</Layout>
Expand Down