diff --git a/changelog/items/bugs-fixed/fix-external-links-on-news-header.md b/changelog/items/bugs-fixed/fix-external-links-on-news-header.md new file mode 100644 index 00000000..aa7c8c54 --- /dev/null +++ b/changelog/items/bugs-fixed/fix-external-links-on-news-header.md @@ -0,0 +1 @@ +- fixed the latest news link redirect in the news header diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index ab74f41f..38f3af97 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -10,9 +10,9 @@ "dependencies": { "@fontsource/metropolis": "4.5.0", "@ory/kratos-client": "0.5.4-alpha.1", - "@stripe/react-stripe-js": "1.4.1", - "@stripe/stripe-js": "1.18.0", - "@tailwindcss/forms": "0.3.3", + "@stripe/react-stripe-js": "1.5.0", + "@stripe/stripe-js": "1.19.0", + "@tailwindcss/forms": "0.3.4", "autoprefixer": "10.3.6", "classnames": "2.3.1", "clipboardy": "2.3.0", @@ -29,9 +29,9 @@ "pretty-bytes": "5.6.0", "react": "17.0.2", "react-dom": "17.0.2", - "react-toastify": "8.0.2", + "react-toastify": "8.0.3", "skynet-js": "3.0.2", - "stripe": "8.176.0", + "stripe": "8.178.0", "superagent": "6.1.0", "swr": "1.0.1", "tailwindcss": "2.2.16", diff --git a/packages/dashboard/yarn.lock b/packages/dashboard/yarn.lock index bbf6091b..97c830c0 100644 --- a/packages/dashboard/yarn.lock +++ b/packages/dashboard/yarn.lock @@ -181,22 +181,22 @@ dependencies: axios "^0.19.2" -"@stripe/react-stripe-js@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.4.1.tgz#884d59286fff00ba77389b32c045516f65d7a340" - integrity sha512-FjcVrhf72+9fUL3Lz3xi02ni9tzH1A1x6elXlr6tvBDgSD55oPJuodoP8eC7xTnBIKq0olF5uJvgtkJyDCdzjA== +"@stripe/react-stripe-js@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-1.5.0.tgz#7e4d80077e88e1f2c1f10ac255f2838d7c9488c2" + integrity sha512-A7+bNeb0O/kw3JdtMeiB6frokPcks5obi+TIjuFRXUMZ5o/o1Qe7eLgLnsb0KOO/g3KJqNCpHiYcKCLESZJJbQ== dependencies: prop-types "^15.7.2" -"@stripe/stripe-js@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.18.0.tgz#687268d7cd68b44b92b86300d7c7f2a6e4df0b98" - integrity sha512-yBRHAMKHnF3kbzv0tpKB82kSow43wW5qXLK8ofg3V9NaaCyObSTO7wJfktWAtG/NBgkJOdUL+pV8dHBj0qvDkQ== +"@stripe/stripe-js@1.19.0": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-1.19.0.tgz#2704adeabcca4ac64d3a5168b2705b165b89e633" + integrity sha512-HycB9mnCCaontVCH9tnRoGVofp4H2c+m518e3g5vLVGmmHVI7qOSI71TGbJ0XoHdfFf2EN2HUAGMCNT5IiiuNQ== -"@tailwindcss/forms@0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.3.3.tgz#a29d22668804f3dae293dcadbef1aa6315c45b64" - integrity sha512-U8Fi/gq4mSuaLyLtFISwuDYzPB73YzgozjxOIHsK6NXgg/IWD1FLaHbFlWmurAMyy98O+ao74ksdQefsquBV1Q== +"@tailwindcss/forms@0.3.4": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.3.4.tgz#e4939dc16450eccf4fd2029770096f38cbb556d4" + integrity sha512-vlAoBifNJUkagB+PAdW4aHMe4pKmSLroH398UPgIogBFc91D2VlHUxe4pjxQhiJl0Nfw53sHSJSQBSTQBZP3vA== dependencies: mini-svg-data-uri "^1.2.3" @@ -2533,10 +2533,10 @@ react-refresh@0.8.3: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f" integrity sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg== -react-toastify@8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/react-toastify/-/react-toastify-8.0.2.tgz#11f73b3a847fcffeb47b1823e8974e9895f98fae" - integrity sha512-0Nud2d0VD4LIevgkB4L8NYoQ5plTpfqgj2CRVxs58SGA/TTO+2Ojz4C1bLUdGUWsw0zuWqd4GJqxNuMIv0cXMw== +react-toastify@8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/react-toastify/-/react-toastify-8.0.3.tgz#7fbf65f69ec357aab8dd03c1496f9177aa92409a" + integrity sha512-rv3koC7f9lKKSkdpYgo/TGzgWlrB/aaiUInF1DyV7BpiM4kyTs+uhu6/r8XDMtBY2FOIHK+FlK3Iv7OzpA/tCA== dependencies: clsx "^1.1.1" @@ -2902,10 +2902,10 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -stripe@8.176.0: - version "8.176.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.176.0.tgz#2f4980ab49acbfe6d67ecaddd54c05e20de9532c" - integrity sha512-0KCDo8TWFgeNWU7cPaqdjO2u2OSth0cmWYZmA7xsuxRCk7/lgWbJ/UbeSphx74cCIjFCmGuzDoNuNxqon9lEbg== +stripe@8.178.0: + version "8.178.0" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.178.0.tgz#89506b27501174eef12cb8ad57cc7d21c98b086a" + integrity sha512-Yk31NdIKf+MKTOdS2CTUIAHzUHOQwayoJFHBkrKGo7bJAlkPFzrIeOORH8SpduoXPZF8mq0JA7qNcFuFPBqabA== dependencies: "@types/node" ">=8.1.0" qs "^6.6.0" diff --git a/packages/website/package.json b/packages/website/package.json index 430838dc..21c10cd8 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -15,7 +15,7 @@ "copy-text-to-clipboard": "^3.0.1", "crypto-browserify": "^3.12.0", "framer-motion": "^4.1.17", - "gatsby": "^3.14.0", + "gatsby": "^3.14.1", "gatsby-background-image": "^1.5.3", "gatsby-image": "^3.11.0", "gatsby-plugin-image": "^1.14.0", @@ -66,7 +66,7 @@ }, "devDependencies": { "cross-env": "^7.0.3", - "cypress": "^8.4.1", + "cypress": "^8.5.0", "cypress-file-upload": "^5.0.8", "prettier": "^2.4.1" }, diff --git a/packages/website/src/components/NewsHeader/NewsHeader.js b/packages/website/src/components/NewsHeader/NewsHeader.js index cdbbffb7..17161f26 100644 --- a/packages/website/src/components/NewsHeader/NewsHeader.js +++ b/packages/website/src/components/NewsHeader/NewsHeader.js @@ -12,6 +12,7 @@ const NewsHeader = () => { id frontmatter { title + external } fields { slug @@ -26,8 +27,9 @@ const NewsHeader = () => { if (!latestNews) return null; // no news - const title = latestNews.node.frontmatter.title; - const link = { to: latestNews.node.fields.slug }; + const { frontmatter, fields } = latestNews.node; + const { title, external } = frontmatter; + const link = external ? { href: external } : { to: fields.slug }; return (
diff --git a/packages/website/src/pages/news.js b/packages/website/src/pages/news.js index 7c0f7719..f3b9a220 100644 --- a/packages/website/src/pages/news.js +++ b/packages/website/src/pages/news.js @@ -6,39 +6,36 @@ import { NewsSummary } from "../components/News"; import Link from "../components/Link"; import Seo from "../components/seo"; -const NewsCard = ({ ...props }) => { - const linkProps = { to: !props.frontmatter.external && props.fields.slug, href: props.frontmatter.external }; +const NewsCard = ({ frontmatter, fields }) => { + const { title, external, categories, description, thumbnail, avatar, author, date } = frontmatter; + const link = external ? { href: external } : { to: fields.slug }; return (
- - + + - {props.frontmatter.categories && ( + {categories && (
- {props.frontmatter.categories.map((category) => ( + {categories.map((category) => ( ))}
)} - - {props.frontmatter.title} + + {title} - {props.frontmatter.description && ( - - {props.frontmatter.description} + {description && ( + + {description} )}
- +
); diff --git a/packages/website/yarn.lock b/packages/website/yarn.lock index c403fb06..c7767a10 100644 --- a/packages/website/yarn.lock +++ b/packages/website/yarn.lock @@ -4360,10 +4360,10 @@ cypress-file-upload@^5.0.8: resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz#d8824cbeaab798e44be8009769f9a6c9daa1b4a1" integrity sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g== -cypress@^8.4.1: - version "8.4.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.4.1.tgz#8b5898bf49359cadc28f02ba05d51f63b8e3a717" - integrity sha512-itJXq0Vx3sXCUrDyBi2IUrkxVu/gTTp1VhjB5tzGgkeCR8Ae+/T8WV63rsZ7fS8Tpq7LPPXiyoM/sEdOX7cR6A== +cypress@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.5.0.tgz#5712ca170913f8344bf167301205c4217c1eb9bd" + integrity sha512-MMkXIS+Ro2KETn4gAlG3tIc/7FiljuuCZP0zpd9QsRG6MZSyZW/l1J3D4iQM6WHsVxuX4rFChn5jPFlC2tNSvQ== dependencies: "@cypress/request" "^2.88.6" "@cypress/xvfb" "^1.2.4" @@ -4399,6 +4399,7 @@ cypress@^8.4.1: minimist "^1.2.5" ospath "^1.2.2" pretty-bytes "^5.6.0" + proxy-from-env "1.0.0" ramda "~0.27.1" request-progress "^3.0.0" supports-color "^8.1.1" @@ -6460,10 +6461,10 @@ gatsby-worker@^0.5.0: "@babel/core" "^7.15.5" "@babel/runtime" "^7.15.4" -gatsby@^3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-3.14.0.tgz#06c27464f1a9d044169ec910d0c9d7ef44e0b1d8" - integrity sha512-ikXoVZ9LQO9lZBxVvQxrYkjhX1zz9/7/Iv/6WCt/UPdgYCWCKc6GWOqlbLKmjShM0fBxJHfjmiahNxuTzJIZsw== +gatsby@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-3.14.1.tgz#0b0edde45bedd18845ec338ca65b1e88d4de3384" + integrity sha512-6wt1MDMOfm6Zm8yiS8zDwjkth5spX7RorKKnYNNfZFyD0lztdql9jgAXFCxO0FxRDagDKxxfxj3cYyHHzPlalg== dependencies: "@babel/code-frame" "^7.14.0" "@babel/core" "^7.15.5" @@ -10785,6 +10786,11 @@ proxy-addr@~2.0.5: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= + pseudomap@^1.0.1, pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"