Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve code/fix and remove eslint errors #296

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
5 changes: 2 additions & 3 deletions components/LandingPageNav.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
// eslint-disable-next-line no-unused-vars
import { ReactElement, useEffect, useState } from 'react'; // ReactElement is only imported for typechecking
import { useEffect, useState } from 'react';
// import { BsSearch } from 'react-icons/bs';
// import { Routes } from '../models/routes';
import { FaRegHeart } from 'react-icons/fa';
Expand All @@ -13,7 +12,7 @@ import { FaRegHeart } from 'react-icons/fa';
*
* @param {Object} props - { fadeInSpeed }
* @param {String} [props.fadeInSpeed = '700' ] - change the speed of fade in "ease-in duration-`fadeInSpeed`" | Example: `"700"` : [tailwind durations](https://tailwindcss.com/docs/transition-duration)
* @returns {ReactElement} JSX
* @returns {JSX.Element} JSX
*/
const LandingPageNav = ({ fadeInSpeed = '1000' }) => {
const [navOpacity, setnavOpacity] = useState(0);
Expand Down
5 changes: 2 additions & 3 deletions components/LargeHeroContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
// eslint-disable-next-line no-unused-vars
import { ReactElement, useEffect, useState } from 'react'; // ReactElement is only imported for typechecking
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';

/**
Expand All @@ -17,7 +16,7 @@ import PropTypes from 'prop-types';
* @param {String} props.title - The title of the hero section
* @param {String} [props.titleSize = '5xl'] - "text-`titleSize`" | Example: `"5xl"` | [Tailwind text sizes](https://tailwindcss.com/docs/font-size)
* @param {*} props.children - The content of the hero section
* @returns {ReactElement} JSX
* @returns {JSX.Element} JSX
*/

const LargeHeroContent = ({
Expand Down
5 changes: 2 additions & 3 deletions components/LargeHeroSection.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check
// eslint-disable-next-line no-unused-vars
import { ReactElement, useEffect, useState } from 'react'; // ReactElement is only imported for typechecking
import PropTypes from 'prop-types';
import React from 'react';

/**
* ## Large Hero Section
Expand All @@ -14,7 +13,7 @@ import PropTypes from 'prop-types';
* @param {String} props.bgImage - Background image url
* @param {String} [props.opacity = '60' ] "bg-opacity-`opacity`" | Example: `"30"` | [Tailwind opacity](https://tailwindcss.com/docs/background-opacity)
* @param {*} props.children - Children elements
* @returns {ReactElement} JSX
* @returns {JSX.Element} JSX
*/

const LargeHeroSection = ({ bgImage, children, opacity = '60' }) => {
Expand Down
2 changes: 1 addition & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function MyApp({ Component, pageProps }) {

MyApp.propTypes = {
Component: PropTypes.func,
pageProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types
pageProps: PropTypes.object,
};

export default MyApp;
2 changes: 0 additions & 2 deletions pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import Document, { Head, Html, Main, NextScript } from 'next/document';
import React from 'react';

class MyDocument extends Document {
// eslint-disable-next-line
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx);
return { ...initialProps };
}

// eslint-disable-next-line
render() {
return (
<Html data-theme="light" lang="en-us">
Expand Down