Skip to content

Commit

Permalink
use default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
tomheaton committed Jun 5, 2024
1 parent 96c7e41 commit 77da569
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 43 deletions.
4 changes: 1 addition & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import Home from "./pages";
import "./styles/App.css";

function App() {
export default function App() {
return (
<Router>
<Routes>
Expand All @@ -11,5 +11,3 @@ function App() {
</Router>
);
}

export default App;
6 changes: 2 additions & 4 deletions src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
WebsiteRights,
} from "./FooterElements";

const Footer = () => {
export default function Footer() {
const toggleHome = () => {
scroll.scrollToTop();
};
Expand Down Expand Up @@ -70,6 +70,4 @@ const Footer = () => {
</FooterContainer>
</>
);
};

export default Footer;
}
6 changes: 2 additions & 4 deletions src/components/HeroSection/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
UDLLink,
} from "./HeroElements";

const HeroSection = () => {
export default function HeroSection() {
const citation = `
@book{prince2023understanding,
author = "Simon J.D. Prince",
Expand Down Expand Up @@ -162,6 +162,4 @@ const HeroSection = () => {
</HeroContent>
</HeroContainer>
);
};

export default HeroSection;
}
6 changes: 2 additions & 4 deletions src/components/Instructors/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
TopLine,
} from "./InstructorsElements";

const InstructorsSection = () => {
export default function InstructorsSection() {
return (
<>
<InstructorsContainer lightBg={true} id="Instructors">
Expand Down Expand Up @@ -497,6 +497,4 @@ const InstructorsSection = () => {
</InstructorsContainer>
</>
);
};

export default InstructorsSection;
}
6 changes: 2 additions & 4 deletions src/components/Media/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
VideoFrame,
} from "./MediaElements";

const MediaSection = () => {
export default function MediaSection() {
return (
<>
<MediaContainer lightBg={false} id="Media">
Expand Down Expand Up @@ -123,6 +123,4 @@ const MediaSection = () => {
</MediaContainer>
</>
);
};

export default MediaSection;
}
6 changes: 2 additions & 4 deletions src/components/More/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
TopLine,
} from "./MoreElements";

const MoreSection = () => {
export default function MoreSection() {
return (
<>
<MoreContainer lightBg={true} id="More">
Expand Down Expand Up @@ -1054,6 +1054,4 @@ const MoreSection = () => {
</MoreContainer>
</>
);
};

export default MoreSection;
}
6 changes: 2 additions & 4 deletions src/components/NavBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
NavMenu,
} from "./NavbarElements";

const Navbar = ({ toggle }) => {
export default function NavBar({ toggle }) {
const [scrollNav, setScrollNav] = useState(false);

const changeNav = () => {
Expand Down Expand Up @@ -101,6 +101,4 @@ const Navbar = ({ toggle }) => {
</IconContext.Provider>
</>
);
};

export default Navbar;
}
4 changes: 1 addition & 3 deletions src/components/Notebooks/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import img from '../../images/coding.svg'
import { Column1, Column2, Heading, Img, ImgWrap, NBLink, NotebookContainer, NotebookRow, NotebookWrapper, Subtitle, TextWrapper, TopLine } from './NotebookElements'

const NotebookSection = () => {
export default function NotebookSection() {
return (
<>
<NotebookContainer lightBg={false} id='Notebooks'>
Expand Down Expand Up @@ -193,5 +193,3 @@ const NotebookSection = () => {
</>
)
}

export default NotebookSection
2 changes: 1 addition & 1 deletion src/components/ScrollToTop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function ScrollToTop() {
const { pathname } = useLocation();

useEffect(() => {
window.scrollTo(0, 0);
window.scrollTo(0, 0, {});
}, [pathname]);

return null;
Expand Down
6 changes: 2 additions & 4 deletions src/components/Sidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SidebarWrapper,
} from "./SidebarElements";

const Sidebar = ({ isOpen, toggle }) => {
export default function Sidebar({ isOpen, toggle }) {
return (
<>
<SidebarContainer isOpen={isOpen} onClick={toggle}>
Expand All @@ -33,6 +33,4 @@ const Sidebar = ({ isOpen, toggle }) => {
</SidebarContainer>
</>
);
};

export default Sidebar;
}
6 changes: 2 additions & 4 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Navbar from "../components/NavBar";
import NotebookSection from "../components/Notebooks";
import Sidebar from "../components/Sidebar";

const Home = () => {
export default function Home() {
const [isOpen, setIsOpen] = useState(false);

const toggle = () => {
Expand All @@ -27,6 +27,4 @@ const Home = () => {
<Footer />
</>
);
};

export default Home;
}
6 changes: 2 additions & 4 deletions src/pages/signin.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import ScrollToTop from "../components/ScrollToTop";
import SignIn from "../components/SignIn";

const SigninPage = () => {
export default function SigninPage() {
return (
<>
<ScrollToTop />
<SignIn />
</>
);
};

export default SigninPage;
}

0 comments on commit 77da569

Please sign in to comment.