Skip to content

Commit

Permalink
Merge pull request #159 from ucsb-cs148-f21/rebranding
Browse files Browse the repository at this point in the history
jv - update name + add MyLists profile menu item
  • Loading branch information
jvoucsb authored Dec 4, 2021
2 parents 8e1d309 + 20f44f4 commit 26d30bb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion client/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ describe('Home', () => {
);

const h2 = await screen.findByRole('heading');
expect(h2).toHaveTextContent('T10 - Anime List');
expect(h2).toHaveTextContent('OnlyWeebs');
});
})
8 changes: 1 addition & 7 deletions client/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ const Header: React.FC<HeaderProps> = (props) => {
>
<Flex align="center" mr={5}>
<Heading size="lg" letterSpacing={"tighter"}>
<Link href={props.user ? "/list" : "/"}>T10-AnimeList</Link>
<Link href={props.user ? "/list" : "/"}>OnlyWeebs</Link>
</Heading>
</Flex>

<div>
<Head>
<title>T10-AnimeList</title>
</Head>
</div>

<Box display={{ base: "block", md: "none" }} onClick={handleToggle}>
{isOpen ? <CloseIcon /> : <HamburgerIcon />}
</Box>
Expand Down
18 changes: 11 additions & 7 deletions client/src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Center, Spinner, Stack } from "@chakra-ui/react";
import Head from "next/head";
import { useRouter } from "next/router";
import React from "react";
import { useMeQuery } from "../generated/graphql";
Expand All @@ -11,7 +12,7 @@ export default function Layout({ children }) {

if (loading) {
return (
<Loading/>
<Loading />
);
}

Expand All @@ -20,13 +21,16 @@ export default function Layout({ children }) {
height="100vh"
alignItems="center"
>
<Head>
<title>OnlyWeebs</title>
</Head>
{(router.pathname !== '/') &&
<Header
maxW="6xl"
margin="0 auto"
width="100%"
user={data?.me}
/>}
<Header
maxW="6xl"
margin="0 auto"
width="100%"
user={data?.me}
/>}
{children}
</Stack>
);
Expand Down
5 changes: 5 additions & 0 deletions client/src/components/profiles/ProfileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ const ProfileMenu: React.FC<Props> = ({ user }) => {
Profile
</MenuItem>
</Link>
<Link href={"/list"}>
<MenuItem>
My Lists
</MenuItem>
</Link>
<MenuDivider/>
<MenuItem
onClick={async () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Home: React.FC<{}> = () => {
zIndex: -1,
}}
>
T10 - Anime List
OnlyWeebs
</Text>
</Heading>

Expand Down

0 comments on commit 26d30bb

Please sign in to comment.