Fixed issue where apostrophe was interpreted as string causing build to fail
This commit is contained in:
parent
657fa1f49a
commit
2962dffc36
5 changed files with 3998 additions and 4019 deletions
|
@ -1,48 +1,48 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
import AppBar from '@material-ui/core/AppBar';
|
import AppBar from '@material-ui/core/AppBar';
|
||||||
import Toolbar from '@material-ui/core/Toolbar';
|
import Toolbar from '@material-ui/core/Toolbar';
|
||||||
import Typography from '@material-ui/core/Typography';
|
import Typography from '@material-ui/core/Typography';
|
||||||
import Button from '@material-ui/core/Button';
|
import Button from '@material-ui/core/Button';
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
import IconButton from '@material-ui/core/IconButton';
|
||||||
import MenuIcon from '@material-ui/icons/Menu';
|
import MenuIcon from '@material-ui/icons/Menu';
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import AuthButton from './AuthButton'
|
import AuthButton from './AuthButton'
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
},
|
},
|
||||||
menuButton: {
|
menuButton: {
|
||||||
marginRight: theme.spacing(2),
|
marginRight: theme.spacing(2),
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export default function ButtonAppBar() {
|
export default function ButtonAppBar() {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<AppBar position="static" color='primary' style={{
|
<AppBar position="static" color='primary' style={{
|
||||||
background: '#1F1B24'
|
background: '#1F1B24'
|
||||||
}}>
|
}}>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<IconButton edge="start" className={classes.menuButton} color="inherit" aria-label="menu">
|
<IconButton edge="start" className={classes.menuButton} color="inherit" aria-label="menu">
|
||||||
<MenuIcon />
|
<MenuIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Typography variant="h6" className={classes.title}>
|
<Typography variant="h6" className={classes.title}>
|
||||||
<Link href='/'>
|
<Link href='/'>
|
||||||
Cath.exe
|
Cath.exe
|
||||||
</Link>
|
</Link>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button color="inherit">Stats</Button>
|
<Button color="inherit">Stats</Button>
|
||||||
<AuthButton/>
|
<AuthButton/>
|
||||||
<Link href='/controlpanel'><Button color="inherit">Control Panel</Button></Link>
|
<Link href='/controlpanel'><Button color="inherit">Control Panel</Button></Link>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
48
package.json
48
package.json
|
@ -1,24 +1,24 @@
|
||||||
{
|
{
|
||||||
"name": "cath-dashboard",
|
"name": "cath-dashboard",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@material-ui/core": "^4.11.4",
|
"@material-ui/core": "^4.11.4",
|
||||||
"@material-ui/icons": "^4.11.2",
|
"@material-ui/icons": "^4.11.2",
|
||||||
"mongodb": "^3.6.9",
|
"mongodb": "^3.6.9",
|
||||||
"next": "11.0.0",
|
"next": "11.0.0",
|
||||||
"next-auth": "^3.27.0",
|
"next-auth": "^3.27.0",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2"
|
"react-dom": "17.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "7.29.0",
|
"eslint": "7.29.0",
|
||||||
"eslint-config-next": "11.0.0"
|
"eslint-config-next": "11.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import '../styles/globals.css'
|
import '../styles/globals.css'
|
||||||
import Navbar from '../components/Navbar'
|
import Navbar from '../components/Navbar'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import { Provider } from 'next-auth/client'
|
import { Provider } from 'next-auth/client'
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return (
|
return (
|
||||||
<Provider>
|
<Provider>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Cath Dashboard</title>
|
<title>Cath Dashboard</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Navbar/>
|
<Navbar/>
|
||||||
<div className='page-container'>
|
<div className='page-container'>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</div>
|
</div>
|
||||||
</Provider>
|
</Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyApp
|
export default MyApp
|
||||||
|
|
|
@ -10,7 +10,7 @@ export default function Home() {
|
||||||
|
|
||||||
<>
|
<>
|
||||||
{!session && <>
|
{!session && <>
|
||||||
<h1>Seems like you're not logged in. Log in to get started!</h1>
|
<h1>Seems like you're not logged in. Log in to get started!</h1>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
{session && <>
|
{session && <>
|
||||||
|
@ -26,25 +26,4 @@ export default function Home() {
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!session) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<h1>Welcome User!</h1>
|
|
||||||
<div className='grid'>
|
|
||||||
<CardContainer title='Commands' link='/controlpanel/commands'>Command controls</CardContainer>
|
|
||||||
<CardContainer title='Commands' link='/controlpanel/commands'>Command controls</CardContainer>
|
|
||||||
<CardContainer title='Commands' link='/controlpanel/commands'>Command controls</CardContainer>
|
|
||||||
<CardContainer title='Commands' link='/controlpanel/commands'>Command controls</CardContainer>
|
|
||||||
<CardContainer title='Commands' link='/controlpanel/commands'>Command controls</CardContainer>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<h1>Seems like you're not logged in. Log in to get started!</h1>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue