Skip to content

Commit aff6e60

Browse files
jdolleadambenhassen
authored andcommitted
Hide "Connect to CDN" and "Get Started" buttons when screen is narrow (#7381)
1 parent 1571086 commit aff6e60

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.changeset/chubby-sites-remain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Hide unnecessary elements from header when screen is narrow

packages/web/app/src/components/get-started/trigger.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ReactElement } from 'react';
22
import { FragmentType, graphql, useFragment } from '@/gql';
33
import { getDocsUrl } from '@/lib/docs-url';
44
import { useToggle } from '@/lib/hooks';
5+
import { cn } from '@/lib/utils';
56
import { GetStartedWizard } from './wizard';
67

78
const GetStartedWizard_GetStartedProgress = graphql(`
@@ -17,6 +18,7 @@ const GetStartedWizard_GetStartedProgress = graphql(`
1718

1819
export function GetStartedProgress(props: {
1920
tasks: FragmentType<typeof GetStartedWizard_GetStartedProgress>;
21+
className?: string;
2022
}): ReactElement | null {
2123
const [isOpen, toggle] = useToggle();
2224
const tasks = useFragment(GetStartedWizard_GetStartedProgress, props.tasks);
@@ -38,7 +40,10 @@ export function GetStartedProgress(props: {
3840
<>
3941
<button
4042
onClick={toggle}
41-
className="cursor-pointer rounded px-4 py-2 text-left hover:opacity-80"
43+
className={cn(
44+
'cursor-pointer rounded px-4 py-2 text-left hover:opacity-80',
45+
props.className,
46+
)}
4247
>
4348
<div className="text-sm font-medium">Get Started</div>
4449
<div className="text-xs text-gray-500">

packages/web/app/src/components/layouts/target.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export const TargetLayout = ({
317317
<Button
318318
onClick={toggleModalOpen}
319319
variant="link"
320-
className="whitespace-nowrap text-orange-500"
320+
className="hidden whitespace-nowrap text-orange-500 md:flex"
321321
>
322322
<LinkIcon size={16} className="mr-2" />
323323
Connect to CDN

packages/web/app/src/components/ui/user-menu.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ export function UserMenu(props: {
116116
) : null}
117117
<div className="flex flex-row items-center gap-8">
118118
<Changelog changes={latestChangelog} />
119-
{currentOrganization ? <GetStartedProgress tasks={currentOrganization.getStarted} /> : null}
119+
{currentOrganization ? (
120+
<GetStartedProgress className="hidden md:block" tasks={currentOrganization.getStarted} />
121+
) : null}
120122
<DropdownMenu>
121123
<DropdownMenuTrigger asChild>
122124
<div

0 commit comments

Comments
 (0)