NotFound.jsx
2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import React from 'react';
import { Link } from 'react-router-dom';
const NotFound = () => {
return (
<div style={containerStyle}>
<div style={contentStyle}>
<div style={errorCodeStyle}>404</div>
<h1 style={titleStyle}>Page Not Found</h1>
<p style={messageStyle}>
Sorry, the page you are looking for doesn't exist or has been moved.
</p>
<div style={actionsStyle}>
<Link to="/" style={primaryButtonStyle}>
Go Home
</Link>
<Link to="/products" style={secondaryButtonStyle}>
Browse Products
</Link>
</div>
<div style={helpSectionStyle}>
<h3>Looking for something specific?</h3>
<div style={linksStyle}>
<Link to="/products" style={linkStyle}>All Products</Link>
<Link to="/cart" style={linkStyle}>Shopping Cart</Link>
<Link to="/login" style={linkStyle}>Sign In</Link>
<Link to="/register" style={linkStyle}>Create Account</Link>
</div>
</div>
</div>
</div>
);
};
const containerStyle = {
minHeight: 'calc(100vh - 200px)',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
padding: '2rem 1rem',
backgroundColor: '#f8f9fa',
};
const contentStyle = {
textAlign: 'center',
maxWidth: '600px',
width: '100%',
};
const errorCodeStyle = {
fontSize: '8rem',
fontWeight: 'bold',
color: '#2c5aa0',
lineHeight: 1,
marginBottom: '1rem',
opacity: 0.1,
};
const titleStyle = {
fontSize: '2.5rem',
marginBottom: '1rem',
color: '#333',
};
const messageStyle = {
fontSize: '1.2rem',
color: '#666',
marginBottom: '2rem',
lineHeight: 1.6,
};
const actionsStyle = {
display: 'flex',
gap: '1rem',
justifyContent: 'center',
marginBottom: '3rem',
flexWrap: 'wrap',
};
const primaryButtonStyle = {
padding: '1rem 2rem',
backgroundColor: '#2c5aa0',
color: 'white',
textDecoration: 'none',
borderRadius: '4px',
fontWeight: '600',
fontSize: '1.1rem',
transition: 'background-color 0.3s',
};
const secondaryButtonStyle = {
padding: '1rem 2rem',
backgroundColor: 'transparent',
color: '#2c5aa0',
textDecoration: 'none',
border: '2px solid #2c5aa0',
borderRadius: '4px',
fontWeight: '600',
fontSize: '1.1rem',
transition: 'background-color 0.3s',
};
const helpSectionStyle = {
padding: '2rem',
backgroundColor: 'white',
borderRadius: '8px',
boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
};
const linksStyle = {
display: 'grid',
gridTemplateColumns: 'repeat(auto-fit, minmax(150px, 1fr))',
gap: '1rem',
marginTop: '1rem',
};
const linkStyle = {
padding: '0.75rem 1rem',
backgroundColor: '#f8f9fa',
color: '#2c5aa0',
textDecoration: 'none',
borderRadius: '4px',
transition: 'background-color 0.3s',
fontSize: '0.9rem',
};
export default NotFound;