-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2294 from quantified-uncertainty/mobile
Mobile page menu
- Loading branch information
Showing
9 changed files
with
282 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/hub/src/components/layout/RootLayout/DesktopUserControls.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { signIn, useSession } from "next-auth/react"; | ||
import { FC } from "react"; | ||
|
||
import { Button, Dropdown, DropdownMenu } from "@quri/ui"; | ||
|
||
import { DropdownWithArrow } from "./DropdownWithArrow"; | ||
import { UserControlsMenu } from "./UserControlsMenu"; | ||
import { useUsername } from "@/hooks/useUsername"; | ||
|
||
export const DesktopUserControls: FC = () => { | ||
const username = useUsername(); | ||
|
||
return username ? ( | ||
<div className="flex items-center gap-2"> | ||
<Dropdown | ||
render={({ close }) => ( | ||
<DropdownMenu> | ||
<UserControlsMenu | ||
mode="desktop" | ||
close={close} | ||
username={username} | ||
/> | ||
</DropdownMenu> | ||
)} | ||
> | ||
<DropdownWithArrow text={username} /> | ||
</Dropdown> | ||
</div> | ||
) : ( | ||
<Button onClick={() => signIn()}>Sign In</Button> | ||
); | ||
}; |
156 changes: 128 additions & 28 deletions
156
packages/hub/src/components/layout/RootLayout/PageMenu.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 0 additions & 106 deletions
106
packages/hub/src/components/layout/RootLayout/UserControls.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
6bc9941
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
quri-hub – ./packages/hub
quri-hub-quantified-uncertainty.vercel.app
quri-hub-git-main-quantified-uncertainty.vercel.app
squigglehub.org
www.squigglehub.org
squiggle-hub.com
www.squiggle-hub.com
www.squiggle-hub.org
www.squigglehub.com
squiggle-hub.org
squigglehub.com