Skip to content

Commit 99e53cf

Browse files
committed
client/modules/Legal/pages/Legal: add types & update to named export
1 parent e10a24e commit 99e53cf

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

client/modules/Legal/pages/CodeOfConduct.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { useTranslation } from 'react-i18next';
3-
import Legal from './Legal';
3+
import { Legal } from './Legal';
44

55
export function CodeOfConduct() {
66
const { t } = useTranslation();

client/modules/Legal/pages/Legal.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ const StyledTabList = styled.nav`
2121
gap: ${remSize(19)};
2222
}
2323
`;
24-
25-
function Legal({ policyFile, title }) {
24+
export interface LegalProps {
25+
/** File name of policy */
26+
policyFile: string;
27+
/** Title of policy */
28+
title: string;
29+
}
30+
export function Legal({ policyFile, title }: LegalProps) {
2631
const { t } = useTranslation();
2732
const [isLoading, setIsLoading] = useState(true);
2833
const [policy, setPolicy] = useState('');
@@ -67,5 +72,3 @@ Legal.propTypes = {
6772
*/
6873
policyFile: PropTypes.string.isRequired
6974
};
70-
71-
export default Legal;

client/modules/Legal/pages/PrivacyPolicy.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { useTranslation } from 'react-i18next';
3-
import Legal from './Legal';
3+
import { Legal } from './Legal';
44

55
function PrivacyPolicy() {
66
const { t } = useTranslation();

0 commit comments

Comments
 (0)