Home page touch-ups (#2135)

* Save part images when navigating home

* Load part images in project cards if available

* Polish home page

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* Merge branch 'main' into franknoirot/project-images

* Mostly restored link + form functionality

* Working cards with images

* Comment out project image stuff

* Little style tweaks

* Remove unused imports

* More minor styling tweaks

* Merge branch 'main' into franknoirot/project-images

* Was using the wrong imported `Project` type

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* Revert any docs changes

* Revert wasm-lib divergences

* Move ProjectCard into its component folder

* Remove unused hook useSaveVideoFrame

* Remove "hideOnLevel" config from theme setting

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Frank Noirot
2024-05-23 11:47:02 -04:00
committed by GitHub
parent 5b7d707b26
commit 023ed1a687
11 changed files with 399 additions and 314 deletions

View File

@ -1,19 +1,18 @@
import {
faArrowDown,
faArrowUp,
faCircle,
} from '@fortawesome/free-solid-svg-icons'
import { CustomIconName } from 'components/CustomIcon'
import { Project } from 'wasm-lib/kcl/bindings/Project'
const DESC = ':desc'
export function getSortIcon(currentSort: string, newSort: string) {
export function getSortIcon(
currentSort: string,
newSort: string
): CustomIconName {
if (currentSort === newSort) {
return faArrowUp
return 'arrowUp'
} else if (currentSort === newSort + DESC) {
return faArrowDown
return 'arrowDown'
}
return faCircle
return 'horizontalDash'
}
export function getNextSearchParams(currentSort: string, newSort: string) {