Skip to content

Commit

Permalink
give the sidebar some love
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Nov 29, 2023
1 parent d3072a2 commit 3d4ed87
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
17 changes: 13 additions & 4 deletions web/src/components/site/Navigation/Anchors/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { LoginIcon } from "src/components/graphics/LoginIcon";
import { Link } from "src/theme/components/Link";

export function LoginAction() {
import { StyleProps } from "@/styled-system/types";

export function LoginAction(props: StyleProps) {
return (
<Link href="/login" kind="secondary" size="sm" {...props}>
Login
</Link>
);
}

export function RegisterAction(props: StyleProps) {
return (
<Link href="/register" kind="ghost" size="sm" p="0">
<LoginIcon width="1.5em" />
<Link href="/register" kind="primary" size="sm" {...props}>
Register
</Link>
);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import Link from "next/link";
import { PropsWithChildren } from "react";

import { Heading } from "src/theme/components";
import { styled } from "@/styled-system/jsx";

export function Title({ children }: PropsWithChildren) {
return (
<Heading size="sm" role="navigation" wordBreak="keep-all">
{children}
</Heading>
<styled.h1 fontSize="lg" fontWeight="bold" wordBreak="keep-all">
<Link href="/">{children}</Link>
</styled.h1>
);
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { useSession } from "src/auth";
import { ComposeAction } from "src/components/site/Navigation/Anchors/Compose";
import { HomeAction } from "src/components/site/Navigation/Anchors/Home";
import { LoginAction } from "src/components/site/Navigation/Anchors/Login";
import {
LoginAction,
RegisterAction,
} from "src/components/site/Navigation/Anchors/Login";
import { NotificationsAction } from "src/components/site/Navigation/Anchors/Notifications";

import { HStack } from "@/styled-system/jsx";

export function Toolbar() {
const account = useSession();
return (
<HStack gap="2" pb="2">
<HStack gap="2" pb="2" w="full">
{account ? (
<>
<HomeAction />
Expand All @@ -18,8 +21,10 @@ export function Toolbar() {
</>
) : (
<>
<HomeAction />
<LoginAction />
<HStack w="full">
<RegisterAction w="full" />
<LoginAction flexShrink={0} />
</HStack>
</>
)}
</HStack>
Expand Down

2 comments on commit 3d4ed87

@vercel
Copy link

@vercel vercel bot commented on 3d4ed87 Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3d4ed87 Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.