diff --git a/web/components/advanced-panel.tsx b/web/components/advanced-panel.tsx deleted file mode 100644 index 51caba67..00000000 --- a/web/components/advanced-panel.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import clsx from 'clsx' -import { useState, ReactNode } from 'react' - -export function AdvancedPanel(props: { children: ReactNode }) { - const { children } = props - const [collapsed, setCollapsed] = useState(true) - - return ( -
-
setCollapsed((collapsed) => !collapsed)} - className="cursor-pointer" - > -
- Advanced -
-
-
- -
- {children} -
-
- ) -} diff --git a/web/components/analytics/charts.tsx b/web/components/analytics/charts.tsx index 2f987d58..56e71257 100644 --- a/web/components/analytics/charts.tsx +++ b/web/components/analytics/charts.tsx @@ -1,4 +1,5 @@ import { Point, ResponsiveLine } from '@nivo/line' +import clsx from 'clsx' import dayjs from 'dayjs' import { zip } from 'lodash' import { useWindowSize } from 'web/hooks/use-window-size' @@ -26,8 +27,10 @@ export function DailyCountChart(props: { return (
= 800) ? 400 : 250 }} + className={clsx( + 'h-[250px] w-full overflow-hidden', + !small && 'md:h-[400px]' + )} > = 800) ? 400 : 250 }} + className={clsx( + 'h-[250px] w-full overflow-hidden', + !small && 'md:h-[400px]' + )} >

{question}

diff --git a/web/components/leaderboard.tsx b/web/components/leaderboard.tsx index b8c725e0..a0670795 100644 --- a/web/components/leaderboard.tsx +++ b/web/components/leaderboard.tsx @@ -40,7 +40,7 @@ export function Leaderboard(props: { {users.map((user, index) => ( {index + 1} - + diff --git a/web/components/linkify.tsx b/web/components/linkify.tsx index f33b2bf5..b4f05165 100644 --- a/web/components/linkify.tsx +++ b/web/components/linkify.tsx @@ -38,10 +38,7 @@ export function Linkify(props: { text: string; gray?: boolean }) { ) }) return ( - + {text.split(regex).map((part, i) => ( {part} diff --git a/web/components/nav/sidebar.tsx b/web/components/nav/sidebar.tsx index 915ceea1..995378ee 100644 --- a/web/components/nav/sidebar.tsx +++ b/web/components/nav/sidebar.tsx @@ -17,7 +17,7 @@ import { ManifoldLogo } from './manifold-logo' import { MenuButton } from './menu' import { ProfileSummary } from './profile-menu' import NotificationsIcon from 'web/components/notifications-icon' -import React, { useState } from 'react' +import React from 'react' import { IS_PRIVATE_MANIFOLD } from 'common/envs/constants' import { CreateQuestionButton } from 'web/components/create-question-button' import { useMemberGroups } from 'web/hooks/use-group' @@ -25,7 +25,6 @@ import { groupPath } from 'web/lib/firebase/groups' import { trackCallback, withTracking } from 'web/lib/service/analytics' import { Group } from 'common/group' import { Spacer } from '../layout/spacer' -import { useWindowSize } from 'web/hooks/use-window-size' import { CHALLENGES_ENABLED } from 'common/challenge' import { buildArray } from 'common/util/array' import TrophyIcon from 'web/lib/icons/trophy-icon' @@ -235,19 +234,22 @@ export default function Sidebar(props: { className?: string }) { })) return ( -