use default exports

This commit is contained in:
Tom Heaton
2024-06-06 00:38:13 +01:00
parent 96c7e41c9d
commit 77da5694bb
12 changed files with 21 additions and 43 deletions

View File

@@ -13,7 +13,7 @@ import {
WebsiteRights,
} from "./FooterElements";
const Footer = () => {
export default function Footer() {
const toggleHome = () => {
scroll.scrollToTop();
};
@@ -70,6 +70,4 @@ const Footer = () => {
</FooterContainer>
</>
);
};
export default Footer;
}

View File

@@ -21,7 +21,7 @@ import {
UDLLink,
} from "./HeroElements";
const HeroSection = () => {
export default function HeroSection() {
const citation = `
@book{prince2023understanding,
author = "Simon J.D. Prince",
@@ -162,6 +162,4 @@ const HeroSection = () => {
</HeroContent>
</HeroContainer>
);
};
export default HeroSection;
}

View File

@@ -16,7 +16,7 @@ import {
TopLine,
} from "./InstructorsElements";
const InstructorsSection = () => {
export default function InstructorsSection() {
return (
<>
<InstructorsContainer lightBg={true} id="Instructors">
@@ -497,6 +497,4 @@ const InstructorsSection = () => {
</InstructorsContainer>
</>
);
};
export default InstructorsSection;
}

View File

@@ -17,7 +17,7 @@ import {
VideoFrame,
} from "./MediaElements";
const MediaSection = () => {
export default function MediaSection() {
return (
<>
<MediaContainer lightBg={false} id="Media">
@@ -123,6 +123,4 @@ const MediaSection = () => {
</MediaContainer>
</>
);
};
export default MediaSection;
}

View File

@@ -18,7 +18,7 @@ import {
TopLine,
} from "./MoreElements";
const MoreSection = () => {
export default function MoreSection() {
return (
<>
<MoreContainer lightBg={true} id="More">
@@ -1054,6 +1054,4 @@ const MoreSection = () => {
</MoreContainer>
</>
);
};
export default MoreSection;
}

View File

@@ -12,7 +12,7 @@ import {
NavMenu,
} from "./NavbarElements";
const Navbar = ({ toggle }) => {
export default function NavBar({ toggle }) {
const [scrollNav, setScrollNav] = useState(false);
const changeNav = () => {
@@ -101,6 +101,4 @@ const Navbar = ({ toggle }) => {
</IconContext.Provider>
</>
);
};
export default Navbar;
}

View File

@@ -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'>
@@ -193,5 +193,3 @@ const NotebookSection = () => {
</>
)
}
export default NotebookSection

View File

@@ -5,7 +5,7 @@ export default function ScrollToTop() {
const { pathname } = useLocation();
useEffect(() => {
window.scrollTo(0, 0);
window.scrollTo(0, 0, {});
}, [pathname]);
return null;

View File

@@ -7,7 +7,7 @@ import {
SidebarWrapper,
} from "./SidebarElements";
const Sidebar = ({ isOpen, toggle }) => {
export default function Sidebar({ isOpen, toggle }) {
return (
<>
<SidebarContainer isOpen={isOpen} onClick={toggle}>
@@ -33,6 +33,4 @@ const Sidebar = ({ isOpen, toggle }) => {
</SidebarContainer>
</>
);
};
export default Sidebar;
}