File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ describe('test NotFound', () => {
9
9
10
10
test ( 'renders not found message' , ( ) => {
11
11
const { getByText } = render ( < NotFound /> ) ;
12
- const element = getByText ( / 亲 , 是 不 是 走 错 地 方 了 ? / i) ;
12
+ const element = getByText ( / 抱 歉 , 您 访 问 的 页 面 不 存 在 / i) ;
13
13
expect ( element ) . toBeInTheDocument ( ) ;
14
14
} ) ;
15
15
} ) ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { FrownOutlined } from '@ant-design/icons' ;
3
2
import classNames from 'classnames' ;
4
3
4
+ import Empty from '../empty' ;
5
5
import './style.scss' ;
6
6
7
- const NotFound : React . FC < any > = function ( {
8
- className,
9
- style,
10
- } : {
7
+ interface INotFoundProps {
11
8
className ?: string ;
12
9
style ?: React . CSSProperties ;
13
- } ) {
10
+ }
11
+
12
+ const NotFound : React . FC < INotFoundProps > = function ( { className, style } ) {
14
13
return (
15
14
< div className = { classNames ( 'dtc-not-found' , className ) } style = { style } >
16
- < h1 >
17
- < FrownOutlined /> 亲,是不是走错地方了?
18
- </ h1 >
15
+ < Empty
16
+ type = "notFound"
17
+ description = "抱歉,您访问的页面不存在"
18
+ className = "dtc-not-found__empty"
19
+ imageStyle = { { height : 250 } }
20
+ />
19
21
</ div >
20
22
) ;
21
23
} ;
Original file line number Diff line number Diff line change 1
1
.dtc-not-found {
2
- line-height : 200px ;
3
- text-align : center ;
2
+ margin-top : 160px ;
3
+ width : 100% ;
4
+ display : flex ;
5
+ justify-content : center ;
4
6
}
You can’t perform that action at this time.
0 commit comments