diff --git a/README.md b/README.md index 7fb3779..03998eb 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Free meal planner for cooks short on ideas! (like me …) ![Screenshot](docs/short_clip.gif) -### Screenshot +### Screenshots #### Home page diff --git a/TODO.md b/TODO.md index 895dfe8..c61b4a1 100644 --- a/TODO.md +++ b/TODO.md @@ -14,4 +14,4 @@ - [ ] Use Css-in-Js - [ ] Redirect to 404 - [x] Typescript -- [ ] strict typing +- [x] strict typing diff --git a/package.json b/package.json index 212fa14..4cfb94e 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@types/node": "^14.14.37", "@types/react": "^17.0.3", "@types/react-router-dom": "^5.1.7", + "prettier": "^2.5.1", "typescript": "^4.2.3" } } diff --git a/src/components/LogInButton.tsx b/src/components/LogInButton.tsx deleted file mode 100644 index 4202fda..0000000 --- a/src/components/LogInButton.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { useAuth0 } from "../utils/auth0-spa"; - -type Props = { color: string }; - -export const LogInButton = ({ color }: Props) => { - const { loginWithRedirect } = useAuth0(); - const handleClick = () => loginWithRedirect({}); - - return ( - - ); -}; diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 9cf8b8b..5a68086 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,47 +1,40 @@ import { MouseEventHandler } from "react"; import { Link } from "react-router-dom"; import { buttonURL, links } from "../constants"; -import { useAuth0 } from "../utils/auth0-spa"; import { FooterLink } from "./FooterLink"; -import { LogInButton } from "./LogInButton"; import { Logo } from "./Logo"; -import { LogOutButton } from "./LogOutButton"; import { RandomButton } from "./RandomButton"; type Props = { openNavClick: MouseEventHandler }; -export const Navbar = ({ openNavClick }: Props) => { - const { isAuthenticated } = useAuth0(); - - return ( -
- +
+); diff --git a/src/components/SideNav.tsx b/src/components/SideNav.tsx index 8f29799..57a15fc 100644 --- a/src/components/SideNav.tsx +++ b/src/components/SideNav.tsx @@ -5,8 +5,6 @@ import ChefImage from "../images/chef.svg"; import SpecialEventImage from "../images/special_event.svg"; import { useAuth0 } from "../utils/auth0-spa"; import { FooterLink } from "./FooterLink"; -import { LogInButton } from "./LogInButton"; -import { LogOutButton } from "./LogOutButton"; import { RandomButton } from "./RandomButton"; type Props = { @@ -35,9 +33,8 @@ export const SideNav = ({ showNav, closeNavClick }: Props) => { left: "0", right: "0", bottom: "0", - backgroundColor: "rgba(0,0,0,0.5)" /* Black background with opacity */, - zIndex: 2 /* Specify a stack order in case you're using a different order for other elements */, - // cursor: "pointer" /* Add a pointer on hover */ + backgroundColor: "rgba(0,0,0,0.5)", + zIndex: 2, }} src={SpecialEventImage} alt="sidenav_background" @@ -65,12 +62,6 @@ export const SideNav = ({ showNav, closeNavClick }: Props) => {
  • -
  • - - {!isAuthenticated ? : } - -
  • -
  • diff --git a/yarn.lock b/yarn.lock index 2dbe543..6f065a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9341,6 +9341,11 @@ prepend-http@^1.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= +prettier@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" + integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== + pretty-bytes@^5.3.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"