Skip to content

Commit

Permalink
Fix error during build
Browse files Browse the repository at this point in the history
  • Loading branch information
madebyais committed Jul 17, 2021
1 parent a44f923 commit 7f6a225
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions components/footer/footer-1.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from "next/link"

const SocialMediaLink = ({ icon, href }: any) => (
<Link href={href}>
<Link href={href} passHref>
<i className={`fa fa-${icon} mr-5`} />
</Link>
)
Expand All @@ -11,7 +11,7 @@ const MenuTitle = ({ title }: any) => (
)

const Menu = ({ title, href }: any) => (
<Link href={href}>
<Link href={href} passHref>
<div className={`block mb-2`}>{title}</div>
</Link>
)
Expand Down
2 changes: 1 addition & 1 deletion components/header/header-1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Header1 = () => (
develop your product faster and launch sooner.
</div>
<div className={`text-lg text-center`}>
Trust me, you'll thank me later.<br/>
Trust me, you&apos;ll thank me later.<br/>
=9
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/header/header-2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Header2 = () => (
develop your product faster and launch sooner.
</div>
<div className={`text-lg`}>
Trust me, you'll thank me later.<br/>
Trust me, you&apos;ll thank me later.<br/>
=9
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/navbar/topnavbar-4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import Link from "next/link";
import { useState } from "react";

const MenuPrimary = ({ label, href }: any) => (
<div className={`mb-5 md:mb-0 md:ml-10`}><Link href={href}>{label}</Link></div>
<div className={`mb-5 md:mb-0 md:ml-10`}><Link href={href} passHref>{label}</Link></div>
)

const MenuSecondary = ({ label, href }: any) => (
<div className={`mb-5 md:mb-0 md:mr-5 text-xs`}><Link href={href}>{label}</Link></div>
<div className={`mb-5 md:mb-0 md:mr-5 text-xs`}><Link href={href} passHref>{label}</Link></div>
)

const TopNavBar4 = () => {
Expand All @@ -23,9 +23,9 @@ const TopNavBar4 = () => {
<MenuSecondary label={`Pricing`} href={`/`} />
</div>
<div className={`md:flex md:justify-end md:items-center`}>
<Link href={`/`}><i className={`cursor-pointer fa fa-facebook mr-5`} /></Link>
<Link href={`/`}><i className={`cursor-pointer fa fa-twitter mr-5`} /></Link>
<Link href={`/`}><i className={`cursor-pointer fa fa-instagram`} /></Link>
<Link href={`/`} passHref><i className={`cursor-pointer fa fa-facebook mr-5`} /></Link>
<Link href={`/`} passHref><i className={`cursor-pointer fa fa-twitter mr-5`} /></Link>
<Link href={`/`} passHref><i className={`cursor-pointer fa fa-instagram`} /></Link>
</div>
</div>
<div className={`container mx-auto flex justify-between items-center p-5 md:px-0`}>
Expand Down
1 change: 1 addition & 0 deletions components/svg/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface ISvgImageProps {
const SvgImage: FC<ISvgImageProps> = ({ src, width= 300, height= 300 }) => (
<>
<Image
alt={`illustration for ${src}`}
src={`/assets/svg/undraw_${src}.svg`}
width={width}
height={height} />
Expand Down
6 changes: 4 additions & 2 deletions pages/api/oauth/[provider]/callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {NextApiRequest, NextApiResponse} from "next";
import constant from "../../../../common/constant";
import Fetch from "../../../../util/fetch";

export default async (req: NextApiRequest, res: NextApiResponse) => {
const OauthProviderCallback = async (req: NextApiRequest, res: NextApiResponse) => {
const { code, provider } = req.query
let account = {}

Expand Down Expand Up @@ -62,4 +62,6 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {

// Recommend to redirect to your dashboard page
res.status(200).json(account)
}
}

export default OauthProviderCallback
2 changes: 1 addition & 1 deletion pages/components/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const LayoutComponentPreview: FC = ({ children }) => {
}

const Menu = ({ title, href }: any) => (
<Link href={href}>
<Link href={href} passHref>
<div className={`cursor-pointer block mb-2`}>{title}</div>
</Link>
)
Expand Down
12 changes: 6 additions & 6 deletions pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ const Login: NextPage<ILoginProps> = ({
export async function getStaticProps() {
return {
props: {
GoogleClientId: process.env.GOOGLE_CLIENT_ID,
GoogleRedirectUri: process.env.GOOGLE_REDIRECT_URI,
GoogleOauthScope: process.env.GOOGLE_OAUTH_SCOPE,
GoogleClientId: process.env.GOOGLE_CLIENT_ID || '',
GoogleRedirectUri: process.env.GOOGLE_REDIRECT_URI || '',
GoogleOauthScope: process.env.GOOGLE_OAUTH_SCOPE || '',

FacebookClientId: process.env.FACEBOOK_CLIENT_ID,
FacebookRedirectUri: process.env.FACEBOOK_REDIRECT_URI,
FacebookOauthScope: process.env.FACEBOOK_OAUTH_SCOPE,
FacebookClientId: process.env.FACEBOOK_CLIENT_ID || '',
FacebookRedirectUri: process.env.FACEBOOK_REDIRECT_URI || '',
FacebookOauthScope: process.env.FACEBOOK_OAUTH_SCOPE || '',
}
}
}
Expand Down

0 comments on commit 7f6a225

Please sign in to comment.