Skip to content

Commit b97a158

Browse files
committed
Fix
1 parent 5800584 commit b97a158

File tree

15 files changed

+84
-90
lines changed

15 files changed

+84
-90
lines changed

next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
reactStrictMode: true,
4+
webpack: (config) => {
5+
config.module.rules.push({
6+
test: /\.(graphql|gql)$/,
7+
exclude: /node_modules/,
8+
loader: "graphql-tag/loader",
9+
});
10+
return config;
11+
},
412
};
513

614
module.exports = nextConfig;

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@mui/x-data-grid": "5.17.24",
2222
"@next/font": "13.1.6",
2323
"axios": "1.3.3",
24+
"graphql": "16.6.0",
2425
"moment": "2.29.4",
2526
"next": "13.1.6",
2627
"react": "18.2.0",
@@ -34,7 +35,8 @@
3435
"@types/react-dom": "18.0.11",
3536
"eslint": "8.34.0",
3637
"eslint-config-next": "13.1.6",
38+
"graphql-tag": "2.12.6",
3739
"prettier": "2.8.4",
3840
"typescript": "4.9.5"
3941
}
40-
}
42+
}

src/components/Context/Auth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React, {
55
useState,
66
} from "react";
77

8-
import { OAuth2 as AuthEntity } from "lib/types/general";
8+
import { OAuth2 as AuthEntity } from "@/types/general";
99

1010
const AuthContext = createContext<AuthEntity | undefined>(undefined);
1111
const SetAuthContext = createContext<null | React.Dispatch<

src/components/Context/Repository.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React, {
55
useState,
66
} from "react";
77

8-
import { Repository as RepositoryEntity } from "lib/types/github";
8+
import { Repository as RepositoryEntity } from "@/types/github";
99

1010
const RepositoryContext = createContext<RepositoryEntity | undefined>(
1111
undefined

src/components/Context/User.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React, {
55
useState,
66
} from "react";
77

8-
import { User as UserEntity } from "lib/types/github";
8+
import { User as UserEntity } from "@/types/github";
99

1010
const UserContext = createContext<UserEntity | undefined>(undefined);
1111
const SetUserContext = createContext<null | React.Dispatch<

src/components/Context/Viewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import React, {
55
useState,
66
} from "react";
77

8-
import { Viewer as ViewerEntity } from "lib/types/github";
8+
import { Viewer as ViewerEntity } from "@/types/github";
99

1010
const ViewerContext = createContext<ViewerEntity | undefined>(undefined);
1111
const SetViewerContext = createContext<null | React.Dispatch<

src/components/Header.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Icon } from "@mdi/react";
1414
import clsx from "clsx";
1515

1616
import { useRepository } from "./Context/Repository";
17-
import useStyles from "assets/jss/components/header";
17+
import useStyles from "@/styles/jss/components/header";
1818

1919
type ColorExpanded = PropTypes.Color | "transparent";
2020

@@ -83,8 +83,7 @@ function Header(props: HeaderProps): ReactElement {
8383
[classes.absolute]: absolute,
8484
[classes.fixed]: fixed,
8585
})}
86-
color={color}
87-
>
86+
color={color}>
8887
<Toolbar className={classes.container}>
8988
<Typography className={classes.title} component="div" variant="h4">
9089
{brand}
@@ -96,23 +95,20 @@ function Header(props: HeaderProps): ReactElement {
9695
position: "absolute",
9796
top: "calc(50% - 0.98rem)",
9897
marginLeft: theme.spacing(4),
99-
}}
100-
>
98+
}}>
10199
<a
102100
href={repositoryData.owner.url}
103101
rel="noreferrer"
104102
target="_blank"
105-
style={{ color: theme.palette.text.primary }}
106-
>
103+
style={{ color: theme.palette.text.primary }}>
107104
{repositoryData?.owner?.login}
108105
</a>
109106
/
110107
<a
111108
href={repositoryData.url}
112109
rel="noreferrer"
113110
target="_blank"
114-
style={{ color: theme.palette.text.primary }}
115-
>
111+
style={{ color: theme.palette.text.primary }}>
116112
{repositoryData?.name}
117113
</a>
118114
</Typography>
@@ -128,8 +124,7 @@ function Header(props: HeaderProps): ReactElement {
128124
color="inherit"
129125
aria-label="open drawer"
130126
size="large"
131-
onClick={handleDrawerToggle}
132-
>
127+
onClick={handleDrawerToggle}>
133128
<Icon path={mdiMenu} size={1} />
134129
</IconButton>
135130
</Hidden>
@@ -142,8 +137,7 @@ function Header(props: HeaderProps): ReactElement {
142137
classes={{
143138
paper: classes.drawerPaper,
144139
}}
145-
onClose={handleDrawerToggle}
146-
>
140+
onClose={handleDrawerToggle}>
147141
<div className={classes.appResponsive}>{rightLinks}</div>
148142
</Drawer>
149143
</Hidden>

src/components/HeaderLinks.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import clsx from "clsx";
66

77
import { useViewer } from "./Context/Viewer";
88
import SetRepository from "./SetRepository";
9-
import useStyles from "assets/jss/components/headerLinks";
9+
import useStyles from "@/styles/jss/components/headerLinks";
1010

1111
function HeaderLinks(): ReactElement {
1212
const [setRepository, setSetRepository] = useState<boolean>(false);
@@ -39,8 +39,7 @@ function HeaderLinks(): ReactElement {
3939
}}
4040
onMouseLeave={() => {
4141
setHoveringLoginButton(false);
42-
}}
43-
>
42+
}}>
4443
<span className={classes.listItemText}>
4544
{hoveringLoginButton
4645
? "Log out of GitHub"
@@ -57,8 +56,7 @@ function HeaderLinks(): ReactElement {
5756
<Button
5857
variant="outlined"
5958
className={classes.navLink}
60-
onClick={handleSetRepository}
61-
>
59+
onClick={handleSetRepository}>
6260
<span className={classes.listItemText}>Set Repository</span>
6361
</Button>
6462
</ListItem>
@@ -71,8 +69,7 @@ function HeaderLinks(): ReactElement {
7169
href={{
7270
pathname: "/",
7371
query: router.query,
74-
}}
75-
>
72+
}}>
7673
<Button variant="text" className={classes.navLink}>
7774
<span className={classes.listItemText}>Dashboard</span>
7875
</Button>

src/components/Image.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "@mui/material";
1111

1212
import { MediaType } from "./Types";
13-
import useStyles from "assets/jss/components/layout";
13+
import useStyles from "@/styles/jss/components/layout";
1414

1515
interface SliderProps {
1616
hideCaption?: boolean;
@@ -38,8 +38,7 @@ function Image({
3838
<Fragment>
3939
<ButtonBase
4040
className={!showAsImage ? classes.galleryItem : ""}
41-
onClick={openMediaDialog}
42-
>
41+
onClick={openMediaDialog}>
4342
<Card className={classes.galleryItemCard} elevation={hidePaper ? 0 : 1}>
4443
{showAsImage ? (
4544
<img src={media.url} alt={media.alternativeText} />
@@ -64,8 +63,7 @@ function Image({
6463
scroll="body"
6564
open={showDialog}
6665
onClick={closeMediaDialog}
67-
onClose={closeMediaDialog}
68-
>
66+
onClose={closeMediaDialog}>
6967
{showDialog ? (
7068
<Fragment>
7169
{!hideTitle && media.alternativeText ? (

src/components/MoveIteration.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
useTheme,
1313
} from "@mui/material";
1414

15-
import { Picker } from "lib/types/general";
15+
import { Picker } from "@/types/general";
1616

1717
interface MoveIterationProps {
1818
iterationsPicker: Array<Picker>;
@@ -39,8 +39,7 @@ function MoveIteration({
3939
maxWidth="sm"
4040
scroll="body"
4141
open={newIteration ? true : false}
42-
onClose={handleCloseMoveIteration}
43-
>
42+
onClose={handleCloseMoveIteration}>
4443
<DialogTitle>Move iteration</DialogTitle>
4544
<DialogContent>
4645
<DialogContentText>
@@ -69,8 +68,7 @@ function MoveIteration({
6968
<Button
7069
onClick={() => {
7170
handleMoveIterationConfirm(newIteration);
72-
}}
73-
>
71+
}}>
7472
Move
7573
</Button>
7674
</DialogActions>

0 commit comments

Comments
 (0)