Skip to content

Commit 29a9ff7

Browse files
committed
Add Header component
1 parent ba95ed0 commit 29a9ff7

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
*
3+
* HeaderComponent
4+
*
5+
*/
6+
7+
import React, { memo } from 'react';
8+
import { Header } from '@buffetjs/custom';
9+
import { useGlobalContext } from 'strapi-helper-plugin';
10+
11+
const HeaderComponent = () => {
12+
const { formatMessage } = useGlobalContext();
13+
14+
const headerProps = {
15+
title: {
16+
label: formatMessage({ id: 'config.Header.Title' }),
17+
},
18+
content: formatMessage({ id: 'config.Header.Description' }),
19+
};
20+
21+
return (
22+
<Header {...headerProps} />
23+
);
24+
};
25+
26+
export default memo(HeaderComponent);

admin/src/translations/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
"popUpWarning.warning.export": "If you continue all your database config<br></br>will be written into config files.",
44
"popUpWarning.button.import": "Yes, import",
55
"popUpWarning.button.export": "Yes, export",
6+
7+
"Header.Title": "Config Sync",
8+
"Header.Description": "Manage your database config acros environments.",
9+
610
"plugin.name": "Config Sync"
711
}

0 commit comments

Comments
 (0)