- fixed issues surrounding next export of static assets
- hostable as static files now
This commit is contained in:
parent
ace17bf7c7
commit
c3721bfb31
@ -6,6 +6,13 @@ const nextConfig = {
|
|||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
output: 'export',
|
||||||
|
images: {
|
||||||
|
unoptimized: true
|
||||||
|
},
|
||||||
|
exportPathMap: async (defaultMap, ctx) => {
|
||||||
|
return defaultMap
|
||||||
|
}
|
||||||
// basePath: '/github-pages',
|
// basePath: '/github-pages',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,9 @@ export default async function handler(
|
|||||||
transporter.sendMail(mailData, function (err, info) {
|
transporter.sendMail(mailData, function (err, info) {
|
||||||
if(err) {
|
if(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
res.status(500).send('Internal Server Error');
|
// res.status(500).send('Internal Server Error');
|
||||||
|
res.status(500).end();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('successful');
|
console.log('successful');
|
||||||
@ -86,11 +88,13 @@ export default async function handler(
|
|||||||
res.status(200).json(req.body);
|
res.status(200).json(req.body);
|
||||||
} else {
|
} else {
|
||||||
// reCAPTCHA verification failed
|
// reCAPTCHA verification failed
|
||||||
res.status(400).send('reCAPTCHA verification failed.');
|
// res.status(400).send('reCAPTCHA verification failed.');
|
||||||
|
res.status(400).end();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
res.status(500).send('Internal server error');
|
// res.status(500).send('Internal server error');
|
||||||
|
res.status(500).end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,8 +11,8 @@ import Link from 'next/link';
|
|||||||
const inter = Inter({ subsets: ['latin'] })
|
const inter = Inter({ subsets: ['latin'] })
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const contactFormSectionRef = useRef<Element>(null);
|
const contactFormSectionRef = useRef<HTMLDivElement>(null);
|
||||||
const landingSectionRef = useRef<Element>(null);
|
const landingSectionRef = useRef<HTMLDivElement>(null);
|
||||||
const [contactClicked, setContactClicked] = useState(false);
|
const [contactClicked, setContactClicked] = useState(false);
|
||||||
|
|
||||||
const customStyles = {
|
const customStyles = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user