Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/AppContext.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { NextDocumentContext } from "next/document"
import { DocumentContext } from "next/document"
import { Store } from "redux"

/**
* NextDocumentContext with redux store context
* @tree
*/
export type AppContext = NextDocumentContext & {
export type AppContext = DocumentContext & {
readonly store: Store
}
8 changes: 4 additions & 4 deletions components/atoms/SpacingPaper.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Paper } from "@material-ui/core"
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles"

const useStyles = makeStyles<Theme, IProps>((theme: Theme) =>
const useStyles = makeStyles<Theme, Props>((theme: Theme) =>
createStyles({
root: (props: IProps) => ({
root: (props: Props) => ({
padding: props.noPadding === true ? theme.spacing(0) : theme.spacing(2),
marginBottom: theme.spacing(2),
}),
})
)

interface IProps {
type Props = {
/**
* shildren
*/
Expand All @@ -25,7 +25,7 @@ interface IProps {
* Paper with spacing
* @param props IProps
*/
export const SpacingPaper = (props: IProps) => {
export const SpacingPaper = (props: Props) => {
const { children } = props
const classes = useStyles(props)
return (
Expand Down
19 changes: 12 additions & 7 deletions components/molecules/NextListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { Avatar, ListItem, ListItemAvatar, ListItemText } from "@material-ui/core";
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
import Link from "next/link";
import React from "react";
import {
Avatar,
ListItem,
ListItemAvatar,
ListItemText,
} from "@material-ui/core"
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles"
import Link from "next/link"
import React from "react"

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand All @@ -21,7 +26,7 @@ const useStyles = makeStyles((theme: Theme) =>
})
)

interface IProps {
type Props = {
/**
* <Link href="/">
*/
Expand Down Expand Up @@ -50,9 +55,9 @@ interface IProps {

/**
* Next.js optimized <ListItem>
* @param props IProps
* @param props Props
*/
export const NextListItem = function(props: IProps) {
export const NextListItem = function(props: Props) {
const { className, href, icon, primary, secondary, onClick } = props
const classes = useStyles(props)
const AvatorIcon = () => icon
Expand Down
6 changes: 3 additions & 3 deletions components/molecules/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ const useStyles = makeStyles((theme: Theme) =>
})
)

interface IProps {}
type Props = {}

/**
* Page header component
* @param props IProps
* @param props Props
*/
export const PageHeader = function(props: IProps) {
export const PageHeader = function(props: Props) {
const classes = useStyles(props)
const selectedPage = useSelector(selectedPageSelector)
return (
Expand Down
6 changes: 3 additions & 3 deletions components/organisms/HeaderArticleContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const useStyles = makeStyles((theme: Theme) =>
})
)

interface IProps {
type Props = {
/**
* children
*/
Expand All @@ -19,9 +19,9 @@ interface IProps {

/**
* Header and article container component
* @param props IProps
* @param props Props
*/
export const HeaderArticleContainer = function(props: IProps) {
export const HeaderArticleContainer = function(props: Props) {
const { children } = props
const classes = useStyles(props)
return (
Expand Down
4 changes: 2 additions & 2 deletions components/organisms/ResponsiveDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ const useStyles = makeStyles((theme: Theme) =>
})
)

interface IProps {
type Props = {
children: React.ReactNode
}

/**
* Responsive drawer
* @see https://material-ui.com/demos/drawers/#responsive-drawer
*/
export const ResponsiveDrawer = function(props: IProps) {
export const ResponsiveDrawer = function(props: Props) {
const { children } = props
const classes = useStyles(props)
const selectedPage = useSelector(selectedPageSelector)
Expand Down
6 changes: 3 additions & 3 deletions components/organisms/Sidenavi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ const useStyles = makeStyles((theme: Theme) =>
})
)

interface IProps {}
type Props = {}

/**
* Side navigation component
* @param props IProps
* @param props Props
*/
export const Sidenavi = function(props: IProps) {
export const Sidenavi = function(props: Props) {
const classes = useStyles(props)
const selectedPage = useSelector(selectedPageSelector)
const dispatch = useDispatch()
Expand Down
11 changes: 6 additions & 5 deletions components/templates/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@ import { useSelector } from "react-redux"
import { selectedPageSelector } from "../../store/page"
import { ResponsiveDrawer } from "../organisms"

const useStyles = makeStyles((theme: Theme) =>
const useStyles = makeStyles((_: Theme) =>
createStyles({
root: {
height: "100%",
},
})
)

interface IProps {
type Props = {
children: React.ReactNode
className?: string
}

export const Layout = function(props: IProps) {
const { children } = props
export const Layout = function(props: Props) {
const { children, className } = props
const classes = useStyles(props)
const selectedPage = useSelector(selectedPageSelector)
return (
<section className={classes.root}>
<section className={`${classes.root} ${className}`}>
<Head>
<title>{selectedPage.title}</title>
</Head>
Expand Down
2 changes: 2 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
Loading