#className not working in `pages404 jsx`

1 messages · Page 1 of 1 (latest)

flat junco
#

Ok so

#

Here's my app directory

#

i'm using nextjs app directory beta

#

but I wanted to make custom 404 so I tried to make it in pages/404.jsx but className doesn't work

#
import Head from 'next/head'
import styles from '../styles/404.css'

export default function PageNotFound() {
    return (
        <main className={styles.main}>
            <Head>
                <title>404 — Zeptar</title>
            </Head>
            <div>
                <h1 className={styles.next_error_h1}>404</h1>
                <div className={styles.next_error_box}>
                    <h2 className={styles.next_error_h2}>This page could not be found.</h2>
                </div>
            </div>
        </main>
    )
}
fossil wyvern
#

rename to 404.module.css and update the import

#

that should do it