Skip to content

Commit

Permalink
Merge pull request #348 from MetaMask/update-developer-page
Browse files Browse the repository at this point in the history
Remove MetaMask SDK changelog on developer page
  • Loading branch information
viphan007 authored Mar 14, 2024
2 parents 8d40959 + abb9b2a commit 4007995
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions fetchDataSSR.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ async function fetchDevChangeLog(token) {

axios.defaults.headers.common['Authorization'] = `Bearer ${token}`
const changeLogData = Promise.allSettled([
axios.get(
'https://api.github.com/repos/MetaMask/metamask-sdk/releases/latest'
),
axios.get(
'https://api.github.com/repos/MetaMask/snaps/releases/latest'
),
Expand All @@ -25,11 +22,6 @@ async function fetchDevChangeLog(token) {
]).then(response => {
const data = []
const siteData = [
{
title: 'MetaMask SDK',
type: 'metamask',
url: 'https://github.com/MetaMask/metamask-sdk/releases'
},
{
title: 'MetaMask Snaps',
type: 'metamask',
Expand All @@ -50,7 +42,6 @@ async function fetchDevChangeLog(token) {
if (site.status === 'fulfilled' && site.value?.status === 200) {
switch (index) {
case 0:
case 1:
data.push({
title: siteData[index].title,
version: site.value.data.tag_name,
Expand All @@ -60,7 +51,7 @@ async function fetchDevChangeLog(token) {
url: siteData[index].url
})
break;
case 2:
case 1:
const text2 = site.value.data
const match2 = text2?.match(/## Linea([\s\S]+?)## Linea/)
if (match2 && match2[1]) {
Expand All @@ -72,7 +63,7 @@ async function fetchDevChangeLog(token) {
})
}
break;
case 3:
case 2:
const text = site.value.data
const match = text?.match(/####([\s\S]+?)####/)
if (match && match[0]) {
Expand Down

0 comments on commit 4007995

Please sign in to comment.