Skip to content

Commit

Permalink
Resolved build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
skunichetty committed Jun 11, 2023
1 parent b843f5d commit c96590e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 28 deletions.
18 changes: 6 additions & 12 deletions components/menuItems.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Link, { Close } from 'next/link'

const MenuItems = ({ showMenu, active }) => {
return (
<ul
Expand All @@ -9,25 +11,17 @@ const MenuItems = ({ showMenu, active }) => {
>
<Close onClick={showMenu} className="cursor-pointer" />
<li>
<Link href="/">
<a>Home</a>
</Link>
<Link href="/">Home</Link>
</li>
<li>
<Link href="/projects">
<a>Projects</a>
</Link>
<Link href="/projects">Projects</Link>
</li>

<li>
<Link href="/about">
<a>About</a>
</Link>
<Link href="/about">About</Link>
</li>
<li>
<Link href="/contact">
<a>Contact</a>
</Link>
<Link href="/contact">Contact</Link>
</li>
</ul>
);
Expand Down
13 changes: 7 additions & 6 deletions components/navBar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useState } from 'react'
import Link from 'next/link'

function NavLink({to, children}) {
return <a href={to} className={`mx-4`}>
Expand All @@ -10,15 +11,15 @@ function MobileNav({open, setOpen}) {
return (
<div className={`absolute top-0 left-0 h-screen w-screen transform ${open ? "-translate-x-0" : "-translate-x-full"} transition-transform duration-300 ease-in-out filter `}>
<div className="flex items-center justify-center filter drop-shadow-md bg-white h-20"> {/*logo container*/}
<a className="text-xl font-semibold" href="/">LOGO</a>
<Link className="text-xl font-semibold" href="/">LOGO</Link>
</div>
<div className="flex flex-col ml-4">
<a className="text-xl font-medium my-4" href="/about" onClick={() => setTimeout(() => {setOpen(!open)}, 100)}>
<Link className="text-xl font-medium my-4" href="/about" onClick={() => setTimeout(() => {setOpen(!open)}, 100)}>
About
</a>
<a className="text-xl font-normal my-4" href="/contact" onClick={() => setTimeout(() => {setOpen(!open)}, 100)}>
</Link>
<Link className="text-xl font-normal my-4" href="/contact" onClick={() => setTimeout(() => {setOpen(!open)}, 100)}>
Contact
</a>
</Link>
</div>
</div>
)
Expand All @@ -31,7 +32,7 @@ export default function Navbar() {
<nav className="flex filter px-4 py-4 h-20 items-center fixed w-full">
<MobileNav open={open} setOpen={setOpen}/>
<div className="w-3/12 flex items-center">
<a className="text-2xl font-semibold" href="/">LOGO</a>
<Link className="text-2xl font-semibold" href="/">LOGO</Link>
</div>
<div className="w-9/12 flex justify-end items-center">

Expand Down
19 changes: 11 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
const isGithubActions = process.env.GITHUB_ACTIONS || false
const isGithubActions = process.env.GITHUB_ACTIONS || false;

let assetPrefix = ''
let basePath = ''
let assetPrefix = "";
let basePath = "";

if (isGithubActions) {
const repo = process.env.GITHUB_REPOSITORY.replace(/.*?\//, '')
const repo = process.env.GITHUB_REPOSITORY.replace(/.*?\//, "");

assetPrefix = `/${repo}/`
basePath = `/${repo}`
assetPrefix = `/${repo}/`;
basePath = `/${repo}`;
}

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
assetPrefix: assetPrefix,
basePath: basePath,
}
images: {
unoptimized: true,
},
};

module.exports = nextConfig
module.exports = nextConfig;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"export": "next export -o out"
},
"dependencies": {
"autoprefixer": "10.4.14",
Expand Down
2 changes: 1 addition & 1 deletion pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Home({ content }) {
<div className="container mx-auto ">
<div className='flex gap-8 items-center'>
<div className='w-1/2'>
<h1 className='mb-5 text-5xl font-bold'>U of M's Premier Data Science Club</h1>
<h1 className='mb-5 text-5xl font-bold'>U of M&apos;s Premier Data Science Club</h1>
<p className='mb-10 text-2xl'>
We empower the next generation of data scientists at the University of Michigan through education and exploration.
</p>
Expand Down

0 comments on commit c96590e

Please sign in to comment.