File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ import CtaSection from './sections/CtaSection';
12
12
import SampleStorySection from './sections/SampleStorySection' ;
13
13
import links from '@/data/links' ;
14
14
15
- export default function HomePage ( ) {
15
+ export default function HomePage ( { versionNumber } ) {
16
16
return (
17
17
< div >
18
18
< Ribbon onClick = { ( ) => window . open ( links . githubProject ) } >
19
19
CodeEdit is currently in development. Check out the roadmap.
20
20
</ Ribbon >
21
- < HeroSection />
21
+ < HeroSection versionNumber = { versionNumber } />
22
22
< IntroFeaturesSection />
23
23
{ /* <SampleStorySection /> */ }
24
24
{ /* <SampleStorySection /> */ }
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ const ProductIconWrap = styled.div`
13
13
margin-right: auto;
14
14
` ;
15
15
16
- const HeroSection = ( ) => {
16
+ const HeroSection = ( { versionNumber} ) => {
17
+
17
18
return (
18
19
< Parallax
19
20
style = { { overflow : 'visible' } }
@@ -42,7 +43,7 @@ const HeroSection = () => {
42
43
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.
43
44
</ Typography >
44
45
< Button href = "https://github.com/CodeEditApp/CodeEdit/releases/latest" target = "_blank" > Download Alpha</ Button >
45
- < Typography variant = "body-reduced" color = "tertiary" > 0.0.1-alpha | macOS 12 +</ Typography >
46
+ < Typography variant = "body-reduced" color = "tertiary" > { versionNumber } | macOS 13 +</ Typography >
46
47
</ Stack >
47
48
</ Column >
48
49
</ Row >
Original file line number Diff line number Diff line change 1
- export { default } from '@/components/pages/home' ;
1
+ import HomePage from '@/components/pages/home' ;
2
+
3
+ export default function Home ( props ) {
4
+ return (
5
+ < HomePage versionNumber = { props . versionNumber } />
6
+ ) ;
7
+ }
8
+
9
+ export async function getStaticProps ( ) {
10
+ const res = await fetch ( 'https://api.github.com/repos/CodeEditApp/CodeEdit/releases/latest' ) ;
11
+ const data = await res . json ( ) ;
12
+
13
+ return {
14
+ props : {
15
+ versionNumber : data . tag_name ,
16
+ } ,
17
+ revalidate : 60 * 60 * 24 , // 24 hours
18
+ } ;
19
+ }
You can’t perform that action at this time.
0 commit comments