Skip to content

Commit

Permalink
Add the CheatSheet link (#7213)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Castres <mcastres@student.42.fr>
  • Loading branch information
Mcastres committed Jul 29, 2020
1 parent 7394a35 commit b4c4307
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
*/

import React from 'react';
import { FormattedMessage } from 'react-intl';
import { useIntl } from 'react-intl';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

import StyledLink from './StyledLink';

function StaticLinks() {
const { formatMessage } = useIntl();
const staticLinks = [
{
icon: 'book',
label: 'documentation',
label: formatMessage({ id: 'app.components.LeftMenuFooter.documentation' }),
destination: 'https://strapi.io/documentation',
},
{
icon: 'file',
label: formatMessage({ id: 'app.static.links.cheatsheet' }),
destination: 'https://strapi-showcase.s3-us-west-2.amazonaws.com/CheatSheet.pdf',
}
];

return (
Expand All @@ -28,7 +33,7 @@ function StaticLinks() {
<li key={label}>
<StyledLink href={destination} target="_blank" rel="noopener noreferrer">
<FontAwesomeIcon icon={icon} />
<FormattedMessage id={`app.components.LeftMenuFooter.${label}`} />
<span>{label}</span>
</StyledLink>
</li>
);
Expand Down
1 change: 1 addition & 0 deletions packages/strapi-admin/admin/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
"app.utils.defaultMessage": " ",
"app.utils.delete": "Delete",
"app.utils.filters": "Filters",
"app.static.links.cheatsheet": "CheatSheet",
"app.utils.placeholder.defaultMessage": " ",
"component.Input.error.validation.integer": "The value must be an integer",
"components.AutoReloadBlocker.description": "Run Strapi with one of the following commands:",
Expand Down

0 comments on commit b4c4307

Please sign in to comment.