diff --git a/components/pages/home/index.js b/components/pages/home/index.js index f070160..de1824a 100644 --- a/components/pages/home/index.js +++ b/components/pages/home/index.js @@ -12,13 +12,13 @@ import CtaSection from './sections/CtaSection'; import SampleStorySection from './sections/SampleStorySection'; import links from '@/data/links'; -export default function HomePage() { +export default function HomePage({ versionNumber }) { return (
window.open(links.githubProject)}> CodeEdit is currently in development. Check out the roadmap. - + {/* */} {/* */} diff --git a/components/pages/home/sections/HeroSection.jsx b/components/pages/home/sections/HeroSection.jsx index 812bc0f..22f4431 100644 --- a/components/pages/home/sections/HeroSection.jsx +++ b/components/pages/home/sections/HeroSection.jsx @@ -13,7 +13,8 @@ const ProductIconWrap = styled.div` margin-right: auto; `; -const HeroSection = () => { +const HeroSection = ({versionNumber}) => { + return ( { CodeEdit is an exciting new code editor written entirely and unapologetically for macOS. Develop any project using any language at speeds like never before with increased efficiency and reliability in an editor that feels right at home on your Mac. - 0.0.1-alpha | macOS 12+ + { versionNumber } | macOS 13+ diff --git a/pages/index.js b/pages/index.js index 44d9018..d8e8212 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1 +1,19 @@ -export { default } from '@/components/pages/home'; +import HomePage from '@/components/pages/home'; + +export default function Home(props) { + return ( + + ); +} + +export async function getStaticProps() { + const res = await fetch('https://api.github.com/repos/CodeEditApp/CodeEdit/releases/latest'); + const data = await res.json(); + + return { + props: { + versionNumber: data.tag_name, + }, + revalidate: 60 * 60 * 24, // 24 hours + }; +}