From d53a1c7dcedfc258919908d8c81672afbadce0b1 Mon Sep 17 00:00:00 2001 From: Nexite Date: Thu, 18 Mar 2021 14:18:09 -0700 Subject: [PATCH 1/3] Fix formatting error and color error --- src/components/Page.js | 2 +- src/pages/_app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Page.js b/src/components/Page.js index 017c0bf..e952ae4 100644 --- a/src/components/Page.js +++ b/src/components/Page.js @@ -34,7 +34,7 @@ const Page = ({ children, isLoggedIn }) => { bold > Account - + diff --git a/src/pages/_app.js b/src/pages/_app.js index 1fe9a9c..a1f22a0 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -3,7 +3,7 @@ import Theme from '@codeday/topo/Theme'; export default function MyApp({ Component, pageProps }) { return ( - + ) From 6e8e1c98ae31fe75e7b97a2c4a6a9bc2958e4efa Mon Sep 17 00:00:00 2001 From: Nexite Date: Thu, 18 Mar 2021 14:42:59 -0700 Subject: [PATCH 2/3] fix small issue with page scrolling to the top when you update --- src/pages/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index fc52ac7..eca8f19 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -21,14 +21,14 @@ import { codedayTheme as theme, useColorMode } from "@codeday/topo/Theme" const { serverRuntimeConfig } = getConfig(); -export default function Home({ user, token, logIn }) { +export default function Home({ user, token, logIn, ...props }) { if (logIn) return const { colorMode, toggleColorMode } = useColorMode() const [changes, setChanges] = useState({}); const router = useRouter(); const onSubmit = () => { - router.replace(router.asPath); + router.replace(router.asPath, router.asPath, { scroll: false }); setChanges({}) } // @ts-ignore @@ -76,7 +76,7 @@ export async function getServerSideProps({ req }) { let { result, error } = await tryAuthenticatedApiQuery(IndexUserQuery, {}, token); console.log(error) if (error) return { props: {} } - + return { props: { user: result?.account?.getUser || null, From 2e48401d4d5890d679b1e734e1b81c172e04346e Mon Sep 17 00:00:00 2001 From: Nexite Date: Thu, 18 Mar 2021 15:55:09 -0700 Subject: [PATCH 3/3] fix small formatting issue --- src/components/UserProperty/CodeOfConduct.js | 1 + src/pages/index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/UserProperty/CodeOfConduct.js b/src/components/UserProperty/CodeOfConduct.js index 784fc50..5c89755 100644 --- a/src/components/UserProperty/CodeOfConduct.js +++ b/src/components/UserProperty/CodeOfConduct.js @@ -17,6 +17,7 @@ const CodeOfConduct = ({ user, onChange }) => { Keep things safe and legal. Community members may not harass others. +
The full Code of Conduct is available at codeday.to/conduct. diff --git a/src/pages/index.js b/src/pages/index.js index eca8f19..2648130 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -5,7 +5,7 @@ import Head from 'next/head'; import { useRouter } from 'next/router'; import WelcomeHeader from '../components/WelcomeHeader'; import { Heading } from '@codeday/topo/Atom/Text'; -import { IndexSitesFromRoleQuery, IndexUserQuery } from './index.gql' +import { IndexUserQuery } from './index.gql' import Divider from '@codeday/topo/Atom/Divider'; import merge from 'deepmerge'; import UserProperties from '../components/UserProperties'; @@ -17,7 +17,7 @@ import jwt from 'jsonwebtoken'; import Link from '@codeday/topo/Atom/Text/Link'; import { getSession } from 'next-auth/client'; import { signIn } from 'next-auth/client'; -import { codedayTheme as theme, useColorMode } from "@codeday/topo/Theme" +import { useColorMode } from "@codeday/topo/Theme" const { serverRuntimeConfig } = getConfig();