mirror of https://gitee.com/answerdev/answer.git
Merge remote-tracking branch 'github/feat/1.1.2/ui' into feat/1.1.2/user-center
This commit is contained in:
commit
1bbe005f66
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="generator" content="Answer - https://github.com/answerdev/answer">
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
|
|
|
@ -4,7 +4,12 @@ import { useTranslation } from 'react-i18next';
|
|||
|
||||
import { usePageTags } from '@/hooks';
|
||||
|
||||
const Index = ({ httpCode = '', errMsg = '', showErrorCode = true }) => {
|
||||
const Index = ({
|
||||
httpCode = '',
|
||||
title = '',
|
||||
errMsg = '',
|
||||
showErrorCode = true,
|
||||
}) => {
|
||||
const { t } = useTranslation('translation', { keyPrefix: 'page_error' });
|
||||
useEffect(() => {
|
||||
// auto height of container
|
||||
|
@ -34,6 +39,7 @@ const Index = ({ httpCode = '', errMsg = '', showErrorCode = true }) => {
|
|||
{showErrorCode && (
|
||||
<h4 className="text-center">{t('http_error', { code: httpCode })}</h4>
|
||||
)}
|
||||
{title && <h4 className="text-center">{title}</h4>}
|
||||
<div className="text-center mb-3 fs-5">
|
||||
{errMsg || t(`desc_${httpCode}`)}
|
||||
</div>
|
||||
|
|
|
@ -102,6 +102,8 @@ a {
|
|||
}
|
||||
#root > footer {
|
||||
margin-top: auto !important;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.bg-f5 {
|
||||
|
|
|
@ -4,8 +4,16 @@ import { HttpErrorContent } from '@/components';
|
|||
|
||||
const Index = () => {
|
||||
const [searchParams] = useSearchParams();
|
||||
const msg = searchParams.get('msg') || '';
|
||||
return <HttpErrorContent httpCode="50X" errMsg={msg} showErrorCode={!msg} />;
|
||||
const errMsg = searchParams.get('msg') || '';
|
||||
const title = searchParams.get('title') || '';
|
||||
return (
|
||||
<HttpErrorContent
|
||||
httpCode="50X"
|
||||
title={title}
|
||||
errMsg={errMsg}
|
||||
showErrorCode={!errMsg}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Index;
|
||||
|
|
Loading…
Reference in New Issue