diff --git a/.vscode/settings.json b/.vscode/settings.json index d41a36c..6e5c8ea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "cSpell.words": ["cookieconsent", "csrf"] + "cSpell.words": ["Rollbar", "cookieconsent", "csrf"] } diff --git a/README.md b/README.md index 885cea1..009d903 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Some super helpful references to keep handy: - [+] chore: posts to github releases (not to npm) -- [ ] feat: profile menu w/ login/logout (see alertgenie) +- [+] feat: profile menu w/ login/logout - [ ] feat: logout endpoint (clears the session) @@ -104,8 +104,8 @@ Some super helpful references to keep handy: - [ ] feat: CSRF token middleware in all state-changing APIs: - - [+] CSRF server support: automatic detection/rejection - - [ ] CSRF client support: Automatic inclusion of the token + - [ ] CSRF server support: automatic detection/rejection + - [+] CSRF client support: Automatic inclusion of the token - UserContext: diff --git a/client/src/App.tsx b/client/src/App.tsx index 72b1e8b..f79bafd 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -6,6 +6,7 @@ import Data from "./pages/Data" import Privacy from "./pages/policy/Privacy" import Terms from "./pages/policy/Terms" import { useCookieConsent } from "./lib/cookieConsent" +import Profile from "./pages/Profile" export default function App(): JSX.Element { useCookieConsent() @@ -28,6 +29,9 @@ export default function App(): JSX.Element { + + + diff --git a/client/src/components/IconicIcon.tsx b/client/src/components/IconicIcon.tsx new file mode 100644 index 0000000..9ad9488 --- /dev/null +++ b/client/src/components/IconicIcon.tsx @@ -0,0 +1,25 @@ +import React, { CSSProperties } from "react" +import openIconicSprite from "open-iconic/sprite/open-iconic.min.svg" + +interface Props { + icon: string + fillColor?: string + className?: string + style?: CSSProperties +} + +const IconicIcon = (props: Props): JSX.Element => { + const className = props.className + ? "iconic-icon ".concat(props.className) + : "iconic-icon" + return ( + + + + ) +} + +export default IconicIcon diff --git a/client/src/components/Layout.tsx b/client/src/components/Layout.tsx index ee81105..f41c375 100644 --- a/client/src/components/Layout.tsx +++ b/client/src/components/Layout.tsx @@ -4,6 +4,7 @@ import "../style/style.scss" import Foot from "./Foot" import { Helmet } from "react-helmet" import Iconic from "./iconic" +import { UserProvider } from "./auth/UserProvider" // https://nextjs.org/learn/basics/using-shared-components/rendering-children-components @@ -21,11 +22,13 @@ const Layout = (props: Props): JSX.Element => { /> -