Skip to content

Commit

Permalink
fix: moved button to new file
Browse files Browse the repository at this point in the history
  • Loading branch information
ae94 committed Oct 14, 2024
1 parent d735151 commit 6e6b6cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/src/components/ActionButtons/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getFetchClient, useNotification } from '@strapi/strapi/admin';
import { useIntl } from 'react-intl';

import ConfirmModal from '../ConfirmModal';
import { exportAllConfig, importAllConfig } from '../../state/actions/Config';
import { exportAllConfig, importAllConfig, downloadZip } from '../../state/actions/Config';

const ActionButtons = () => {
const { post, get } = getFetchClient();
Expand Down Expand Up @@ -37,6 +37,7 @@ const ActionButtons = () => {
)}
onSubmit={(force) => dispatch(exportAllConfig(partialDiff, toggleNotification, formatMessage, post, get))}
/>
<Button onClick={() => dispatch(downloadZip(toggleNotification, formatMessage, post, get))}>{formatMessage({ id: 'config-sync.Buttons.DownloadConfig' })}</Button>
{!isEmpty(partialDiff) && (
<Typography variant="epsilon">{Object.keys(partialDiff).length} {Object.keys(partialDiff).length === 1 ? "config change" : "config changes"}</Typography>
)}
Expand Down
1 change: 1 addition & 0 deletions admin/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"ConfigDiff.Database": "Database",

"Buttons.Export": "Export",
"Buttons.DownloadConfig": "Download Config",
"Buttons.Import": "Import",

"FirstExport.Message": "Looks like this is your first time using config-sync for this project.",
Expand Down

0 comments on commit 6e6b6cf

Please sign in to comment.