diff --git a/packages/web/components/nav-containers/home.tsx b/packages/web/components/nav-containers/home.tsx index 92d655eb8..8a788bcc1 100644 --- a/packages/web/components/nav-containers/home.tsx +++ b/packages/web/components/nav-containers/home.tsx @@ -29,6 +29,7 @@ import { Toaster } from 'react-hot-toast' import { useGetViewerQuery } from '../../lib/networking/queries/useGetViewerQuery' export function HomeContainer(): JSX.Element { + const router = useRouter() const homeData = useGetHomeItems() const { viewerData } = useGetViewerQuery() @@ -38,6 +39,10 @@ export function HomeContainer(): JSX.Element { return viewerData?.me?.profile.username }, [viewerData]) + useEffect(() => { + window.sessionStorage.setItem('nav-return', router.asPath) + }, [router.asPath]) + return ( @@ -265,7 +274,7 @@ const TopPicksHomeSection = (props: HomeSectionProps): JSX.Element => { itemsPerPage={4} loadMoreButtonText="Load more Top Picks" render={(homeItem) => ( - { ) } -type TopPickItemViewProps = { +type TopPicksItemViewProps = { dispatchList: (args: { type: string; itemId?: string }) => void } -const TopicPickHomeItemView = ( - props: HomeItemViewProps & TopPickItemViewProps +const TopPicksItemView = ( + props: HomeItemViewProps & TopPicksItemViewProps ): JSX.Element => { const router = useRouter() return ( diff --git a/packages/web/components/templates/NavigationLayout.tsx b/packages/web/components/templates/NavigationLayout.tsx index e1b5742b9..c8e88649a 100644 --- a/packages/web/components/templates/NavigationLayout.tsx +++ b/packages/web/components/templates/NavigationLayout.tsx @@ -15,7 +15,6 @@ import { updateTheme } from '../../lib/themeUpdater' import { Priority, useRegisterActions } from 'kbar' import { ThemeId, theme } from '../tokens/stitches.config' import { NavigationMenu } from './navMenu/NavigationMenu' -import { DEFAULT_HEADER_HEIGHT } from './homeFeed/HeaderSpacer' import { Button } from '../elements/Button' import { List } from '@phosphor-icons/react' import { usePersistedState } from '../../lib/hooks/usePersistedState' @@ -131,19 +130,13 @@ export function NavigationLayout(props: NavigationLayoutProps): JSX.Element { {props.pageMetaDataProps ? ( ) : null} - { + setShowNavMenu(!showNavMenu) }} - > -
{ - setShowNavMenu(!showNavMenu) - }} - /> - + /> {!isLoading && showNavMenu && ( <> {}} showMenu={showNavMenu} - setShowMenu={setShowNavMenu} /> @@ -178,43 +173,36 @@ export function NavigationLayout(props: NavigationLayoutProps): JSX.Element { } type HeaderProps = { + menuOpen: booelean toggleMenu: () => void } const Header = (props: HeaderProps): JSX.Element => { - const small = false - return ( - - - + ) } diff --git a/packages/web/components/templates/library/LibraryContainer.tsx b/packages/web/components/templates/library/LibraryContainer.tsx index c67624cec..83eb5cd41 100644 --- a/packages/web/components/templates/library/LibraryContainer.tsx +++ b/packages/web/components/templates/library/LibraryContainer.tsx @@ -927,7 +927,7 @@ function HomeFeedGrid(props: HomeFeedContentProps): JSX.Element { py: '20px', width: '100%', '@mdDown': { - px: '0px', + px: layout == 'GRID_LAYOUT' ? '20px' : '0px', }, }} distribution="start" @@ -1044,7 +1044,7 @@ export function LibraryItemsLayout( mb: '10px', px: '70px', '@xlgDown': { - px: '10px', + px: '0px', }, }} > @@ -1195,7 +1195,7 @@ function LibraryItems(props: LibraryItemsProps): JSX.Element { overflow: 'visible', px: '70px', '@xlgDown': { - px: '10px', + px: '0px', }, '@mdDown': { px: '0px', diff --git a/packages/web/components/templates/library/LibraryHeader.tsx b/packages/web/components/templates/library/LibraryHeader.tsx index 849f6edee..ca89c1bab 100644 --- a/packages/web/components/templates/library/LibraryHeader.tsx +++ b/packages/web/components/templates/library/LibraryHeader.tsx @@ -88,14 +88,13 @@ export function LibraryHeader(props: LibraryHeaderProps): JSX.Element { px: '70px', left: LIBRARY_LEFT_MENU_WIDTH, transition: 'height 0.5s', - '@xlgDown': { - px: '10px', - }, '@mdDown': { - px: '10px', left: '0px', right: '0', }, + '@xlgDown': { + px: '40px', + }, }} > @@ -131,17 +130,6 @@ const HeaderControls = (props: LibraryHeaderProps): JSX.Element => { return ( <> - {!searchBoxFocused && ( - - - - )} - void showMenu: boolean - setShowMenu: (show: boolean) => void } export function NavigationMenu(props: NavigationMenuProps): JSX.Element { @@ -94,30 +93,7 @@ export function NavigationMenu(props: NavigationMenuProps): JSX.Element { zIndex: 2, }} > - - - - - +