From 01c52908caea7b7d2aed1f57f2d195dbce583406 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 29 Dec 2023 19:53:30 +0530 Subject: [PATCH] add hightlights from a json file --- .../src/lib/components/homeTabFeatured.tsx | 19 +++++++++---------- releaseDetails.json | 10 ++++++++++ tsconfig.json | 1 + 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 releaseDetails.json diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index 4f1d72bfad..8c9eeb6e2c 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -4,6 +4,7 @@ import {FormattedMessage} from 'react-intl' import {ThemeContext, themes} from '../themeContext' import Carousel from 'react-multi-carousel' import 'react-multi-carousel/lib/styles.css' +const releaseDetails = require('./../../../../../../releaseDetails.json') const _paq = (window._paq = window._paq || []) // eslint-disable-line @@ -73,28 +74,26 @@ function HomeTabFeatured() {
- +
-
- -
+
{releaseDetails.version} {releaseDetails.title}
    -
  • -
  • -
  • -
  • + { releaseDetails.highlight1 ?
  • {releaseDetails.highlight1}
  • : '' } + { releaseDetails.highlight2 ?
  • {releaseDetails.highlight2}
  • : '' } + { releaseDetails.highlight3 ?
  • {releaseDetails.highlight3}
  • : '' } + { releaseDetails.highlight4 ?
  • {releaseDetails.highlight4}
  • : '' }
_paq.push(['trackEvent', 'hometab', 'featuredSection', 'seeFullChangelog'])} target="__blank" - href="https://medium.com/remix-ide/remix-release-v0-38-0-dccd551b6f1e" + href={releaseDetails.moreLink} > - + {releaseDetails.more}
diff --git a/releaseDetails.json b/releaseDetails.json new file mode 100644 index 0000000000..18c131baac --- /dev/null +++ b/releaseDetails.json @@ -0,0 +1,10 @@ +{ + "version": "v0.38.0", + "title": "RELEASE HIGHLIGHTS", + "highlight1": "Alpha release for Solidity co-pilot", + "highlight2": "Define Solidity remappings in remappings.txt file", + "highlight3": "Run free function for any selected environment", + "highlight4": "New Circom ZKP templates: Hash Checker & Rate Limiting Nullifier", + "more": "Read More", + "moreLink": "https://medium.com/remix-ide/remix-release-v0-38-0-dccd551b6f1e" + } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 5f976c49ef..91a6ab5034 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, + "resolveJsonModule": true, "experimentalDecorators": true, "importHelpers": true, "target": "ES2015",