Skip to content

Commit 4eccfd8

Browse files
authored
[code-infra] Migrate versions page to getStaticProps (#47151) (#47174)
1 parent 894dd47 commit 4eccfd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/pages/versions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function getBranches() {
3636
return JSON.parse(text);
3737
}
3838

39-
Page.getInitialProps = async () => {
39+
export async function getStaticProps() {
4040
const FILTERED_BRANCHES = ['latest', 'l10n', 'next', 'migration', 'material-ui.com'];
4141

4242
const branches = await getBranches();
@@ -76,5 +76,5 @@ Page.getInitialProps = async () => {
7676
});
7777
}
7878

79-
return { versions: sortedUniqBy(versions, 'version') };
80-
};
79+
return { props: { versions: sortedUniqBy(versions, 'version') } };
80+
}

0 commit comments

Comments
 (0)