Skip to content

Commit

Permalink
always link to /whats-new/feed.xml
Browse files Browse the repository at this point in the history
i18n versions of this page were linking to /<locale>/whats-new/feed.xml,
which doesn't exist, as the RSS feed isn't translated.
this change makes sure we always properly link to the RSS feed
  • Loading branch information
sunnyzanchi committed May 7, 2024
1 parent b0dcfac commit be46998
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/whats-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ import SEO from '../components/SEO';
import ErrorBoundary from '../components/ErrorBoundary';
import { TYPES } from '../utils/constants';

const WhatsNew = ({ data, location, pageContext }) => {
const WhatsNew = ({ data, location }) => {
const now = useMemo(() => new Date(), []);
const { slug } = pageContext;
const { allMarkdownRemark } = data;
const posts = allMarkdownRemark.edges.map(({ node }) => node);
const postsByDate = Array.from(
Expand Down Expand Up @@ -64,7 +63,7 @@ const WhatsNew = ({ data, location, pageContext }) => {
>
<span>{t('strings.whatsNew.title')}</span>
<Link
to={`${slug}/feed.xml`}
to="/whats-new/feed.xml"
css={css`
display: flex;
align-items: center;
Expand Down Expand Up @@ -130,7 +129,6 @@ const WhatsNew = ({ data, location, pageContext }) => {
WhatsNew.propTypes = {
data: PropTypes.object.isRequired,
location: PropTypes.object.isRequired,
pageContext: PropTypes.object.isRequired,
};

export const pageQuery = graphql`
Expand Down

0 comments on commit be46998

Please sign in to comment.