Nexus / frontend /app /not-found.js
ChandimaPrabath's picture
nexus auth integrated
cdf301a
'use client';
import { useRouter } from 'next/navigation';
export default function Custom404() {
const router = useRouter();
const handleGoBack = () => {
router.back();
};
return (
<div style={styles.container}>
<h1 className='pulse-and-fade' style={styles.heading}>404 - Page Not Found</h1>
<p className='pulse-and-fade' style={styles.message}>
Oops! The page you're looking for doesn't exist. Let’s get you back on track!
</p>
<div className='pulse-and-fade' style={styles.buttons}>
<button onClick={handleGoBack} style={styles.button}>
Go Back
</button>
<button onClick={() => router.push('/')} style={styles.button}>
Go to Home
</button>
</div>
</div>
);
}
const styles = {
container: {
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
height: '100vh',
backgroundColor: 'var(--background)',
color: 'var(--foreground)',
textAlign: 'center',
},
heading: {
fontSize: '48px',
fontWeight: 'bold',
marginBottom: '20px',
},
message: {
fontSize: '18px',
marginBottom: '30px',
maxWidth: '400px',
color: 'var(--foreground)',
},
buttons: {
display: 'flex',
gap: '15px',
},
button: {
padding: '10px 20px',
fontSize: '16px',
borderRadius: '5px',
border: 'none',
cursor: 'pointer',
backgroundColor: 'var(--button-background)',
color: 'var(--foreground)',
transition: 'background-color 0.3s',
},
buttonHover: {
backgroundColor: 'var(--button-hover)',
},
};