sy-records commented on code in PR #1217:
URL: https://github.com/apache/incubator-answer/pull/1217#discussion_r1899934786
##########
ui/src/components/Footer/index.tsx:
##########
@@ -18,30 +18,46 @@
*/
import React from 'react';
+import { Link } from 'react-router-dom';
import { Container } from 'react-bootstrap';
-import { Trans } from 'react-i18next';
+import { Trans, useTranslation } from 'react-i18next';
import dayjs from 'dayjs';
import { siteInfoStore } from '@/stores';
const Index = () => {
+ const { t } = useTranslation('translation', { keyPrefix: 'footer' }); //
Scoped translations for footer
const fullYear = dayjs().format('YYYY');
const siteName = siteInfoStore((state) => state.siteInfo.name);
const cc = `${fullYear} ${siteName}`;
+
return (
<footer className="bg-light">
- <Container className="py-3">
- <p className="text-center mb-0 small text-secondary">
- <Trans i18nKey="footer.build_on" values={{ cc }}>
- Powered by
- {/* eslint-disable-next-line react/jsx-no-target-blank */}
- <a href="https://answer.apache.org" target="_blank">
+ <Container>
+ <p className="text-center mb-0 small">
+ {/* Link to Terms of Service with right margin */}
+ <Link to="/tos" className="me-2">
+ {t('label', { keyPrefix: 'admin.legal.terms_of_service' })}
+ </Link>
+
+ {/* Link to Privacy Policy with right margin for spacing */}
+ <Link to="/privacy">
+ {t('label', { keyPrefix: 'admin.legal.privacy_policy' })}
+ </Link>
+ </p>
+ <p className="text-center mb-0 small">
+ <Trans i18nKey="build_on" values={{ cc }}>
+ Powered by{' '}
Review Comment:
Why are you adding spaces?
The original is the correct result
```
Powered by <a href="https://answer.apache.org" target="_blank"> Apache
Answer </a>- the open-source software that powers Q&A communities.<br>Made
with love © 2024 Local Answer.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]