Skip to content

Commit

Permalink
Merge remote-tracking branch 'Nexite/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexite committed Nov 13, 2021
2 parents 2277929 + 184320a commit 92faf29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Page = ({ children, isLoggedIn }) => {
bold
>
Account
</Text>
</Text>
</a>
</SiteLogo>
<Menu>
Expand Down
1 change: 1 addition & 0 deletions src/components/UserProperty/CodeOfConduct.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CodeOfConduct = ({ user, onChange }) => {
<Item>Keep things safe and legal.</Item>
<Item>Community members may not harass others.</Item>
</List>
<br />
<Text>
The full Code of Conduct is available
at <Link href="https://codeday.to/conduct" target="_blank">codeday.to/conduct</Link>.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Theme from '@codeday/topo/Theme';

export default function MyApp({ Component, pageProps }) {
return (
<Theme brandColor="red" cookies={pageProps.cookies}>
<Theme cookies={pageProps.cookies}>
<Component {...pageProps} />
</Theme>
)
Expand Down
10 changes: 5 additions & 5 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -17,18 +17,18 @@ 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();

export default function Home({ user, token, logIn }) {
export default function Home({ user, token, logIn, ...props }) {

if (logIn) return <Page><Button onClick={() => signIn('auth0')}>Sign in to CodeDay</Button></Page>
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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 92faf29

Please sign in to comment.