Linting fixes
continuous-integration/drone/push Build is passing Details

This commit is contained in:
William Tran 2021-08-26 20:03:08 -04:00
parent 4fd4fd6987
commit 95cc1c10a6
2 changed files with 19 additions and 19 deletions

View File

@ -1,3 +1,4 @@
import NextLink from "next/link";
import React, { import React, {
ReactNode, ReactNode,
ComponentType, ComponentType,
@ -6,15 +7,8 @@ import React, {
useEffect, useEffect,
useCallback, useCallback,
} from "react"; } from "react";
import styles from "./OrganizedContent.module.css";
import NextLink from "next/link";
export interface LinkProps { //todo check if we need this import styles from "./OrganizedContent.module.css";
className?: string;
id: string;
children: ReactNode;
setMobileNavOpen?: React.Dispatch<React.SetStateAction<boolean>>;
}
type Link = ComponentType<LinkProps>; type Link = ComponentType<LinkProps>;
@ -103,7 +97,7 @@ export function OrganizedContent({
onClick={() => setMobileNavOpen(!mobileNavOpen)} onClick={() => setMobileNavOpen(!mobileNavOpen)}
> >
{/* this is copied from hamburger.svg with changed colors */} {/* this is copied from hamburger.svg with changed colors */}
<Burger/> <Burger />
</button> </button>
</div> </div>
); );
@ -139,12 +133,13 @@ function Nav({
} }
return ( return (
<div onClick={() => {setMobileNavOpen(false)}}> <div
<Link onClick={() => {
className={classNames.join(" ")} setMobileNavOpen(false);
id={section.id} }}
key={section.id} key={section.id}
> >
<Link className={classNames.join(" ")} id={section.id}>
<span className={styles.marker} /> <span className={styles.marker} />
<div>{section.title}</div> <div>{section.title}</div>
</Link> </Link>
@ -374,5 +369,5 @@ function Burger() {
strokeLinejoin="round" strokeLinejoin="round"
/> />
</svg> </svg>
) );
} }

View File

@ -238,7 +238,12 @@ export function OrganizedContentDemo() {
)!.Content; )!.Content;
return ( return (
<OrganizedContent sections={sections} id={id} link={FakeLink} pageTitle="Playground"> <OrganizedContent
sections={sections}
id={id}
link={FakeLink}
pageTitle="Playground"
>
<Content /> <Content />
</OrganizedContent> </OrganizedContent>
); );