Skip to content

Commit 6e6b6cf

Browse files
committed
fix: moved button to new file
1 parent d735151 commit 6e6b6cf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

admin/src/components/ActionButtons/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getFetchClient, useNotification } from '@strapi/strapi/admin';
88
import { useIntl } from 'react-intl';
99

1010
import ConfirmModal from '../ConfirmModal';
11-
import { exportAllConfig, importAllConfig } from '../../state/actions/Config';
11+
import { exportAllConfig, importAllConfig, downloadZip } from '../../state/actions/Config';
1212

1313
const ActionButtons = () => {
1414
const { post, get } = getFetchClient();
@@ -37,6 +37,7 @@ const ActionButtons = () => {
3737
)}
3838
onSubmit={(force) => dispatch(exportAllConfig(partialDiff, toggleNotification, formatMessage, post, get))}
3939
/>
40+
<Button onClick={() => dispatch(downloadZip(toggleNotification, formatMessage, post, get))}>{formatMessage({ id: 'config-sync.Buttons.DownloadConfig' })}</Button>
4041
{!isEmpty(partialDiff) && (
4142
<Typography variant="epsilon">{Object.keys(partialDiff).length} {Object.keys(partialDiff).length === 1 ? "config change" : "config changes"}</Typography>
4243
)}

admin/src/translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"ConfigDiff.Database": "Database",
2929

3030
"Buttons.Export": "Export",
31+
"Buttons.DownloadConfig": "Download Config",
3132
"Buttons.Import": "Import",
3233

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

0 commit comments

Comments
 (0)