Skip to content

Commit

Permalink
fix: hydration issues (#4090)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshanzel authored Jan 21, 2025
1 parent b852ae5 commit 6e1f673
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions packages/shared/src/components/BookmarkFeedLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { PropsWithChildren, ReactElement, ReactNode } from 'react';
import React, { useContext, useMemo, useState } from 'react';
import dynamic from 'next/dynamic';
import classNames from 'classnames';
import {
BOOKMARKS_FEED_QUERY,
SEARCH_BOOKMARKS_QUERY,
Expand Down Expand Up @@ -139,10 +138,7 @@ export default function BookmarkFeedLayout({
</Typography>
</FeedPageHeader>
<CustomFeedHeader
className={classNames(
'mb-6',
shouldUseListFeedLayout && !shouldUseListMode && 'px-4',
)}
className={shouldUseListFeedLayout && !shouldUseListMode && 'px-4'}
>
{searchChildren}
{!isFolderPage && (
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/hooks/useFeedLayout.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext } from 'react';
import { useViewSize, ViewSize } from './useViewSize';
import { useViewSizeClient, ViewSize } from './useViewSize';
import { useActiveFeedNameContext } from '../contexts/ActiveFeedNameContext';
import {
CommentFeedPage,
Expand Down Expand Up @@ -109,7 +109,7 @@ const getFeedPageLayoutComponent = ({
export const useFeedLayout = ({
feedRelated = true,
}: UseFeedLayoutProps = {}): UseFeedLayoutReturn => {
const isLaptopSize = useViewSize(ViewSize.Laptop);
const isLaptopSize = useViewSizeClient(ViewSize.Laptop);
const isLaptop = isNullOrUndefined(isLaptopSize) || isLaptopSize;
const { feedName } = useActiveFeedNameContext();
const { insaneMode } = useContext(SettingsContext);
Expand Down

0 comments on commit 6e1f673

Please sign in to comment.