-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:canonical/charmhub.io into WD-17915-…
…upgrade-mermaid-version
- Loading branch information
Showing
23 changed files
with
627 additions
and
9,838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
static/js/src/interfaces/components/InterfaceDetailsNav/InterfaceDetailsNav.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
static/js/src/store/components/EmptyResultSection/EmptyResultSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { Col, Link, List, Row, Strip } from "@canonical/react-components"; | ||
import { SearchInput } from "../SearchInput"; | ||
import { PackageFilter } from "../PackageFilter"; | ||
import { useRef } from "react"; | ||
import { Store } from "../../types"; | ||
|
||
export const EmptyResultSection = ({ | ||
searchTerm, | ||
data, | ||
isFetching, | ||
}: { | ||
searchTerm: string | null; | ||
data?: Store; | ||
isFetching: boolean; | ||
}) => { | ||
const searchRef = useRef<HTMLInputElement | null>(null); | ||
|
||
return ( | ||
<Strip> | ||
<Row> | ||
<Col size={3}> | ||
<PackageFilter data={data} disabled={isFetching} /> | ||
</Col> | ||
|
||
<Col size={9}> | ||
<Row> | ||
<Col size={9}> | ||
<h1 className="p-heading--2"> | ||
Search results for "{searchTerm}" | ||
</h1> | ||
<SearchInput searchRef={searchRef} /> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col size={4}> | ||
<h2 className="p-heading--4"> | ||
Why not trying widening your search? | ||
</h2> | ||
<p className="p-heading--4">You can do this by:</p> | ||
</Col> | ||
<Col size={4}> | ||
<List | ||
items={[ | ||
"Adding alternative words or phrases", | ||
"Using individual words instead of phrases", | ||
"Trying a different spelling", | ||
]} | ||
ticked | ||
/> | ||
</Col> | ||
</Row> | ||
|
||
<Row> | ||
<Col size={9}> | ||
<div className="u-fixed-width u-hide--small u-hide--medium"> | ||
<hr className="p-rule" /> | ||
</div> | ||
</Col> | ||
</Row> | ||
|
||
<Row> | ||
<Col size={4}> | ||
<h2 className="p-heading--4">Still no luck?</h2> | ||
</Col> | ||
<Col size={4} className="snap-packages__empty-more-options"> | ||
<List | ||
items={[ | ||
<Link | ||
href="/" | ||
key={"explore-store"} | ||
className={"snap-packages__list-item"} | ||
> | ||
Explore the store | ||
</Link>, | ||
<Link | ||
href="https://canonical.com/contact-us" | ||
key={"contact-us"} | ||
className={"snap-packages__list-item"} | ||
> | ||
Contact us | ||
</Link>, | ||
]} | ||
/> | ||
</Col> | ||
</Row> | ||
</Col> | ||
</Row> | ||
</Strip> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { EmptyResultSection } from "./EmptyResultSection"; |
Oops, something went wrong.