use webapp builder

This commit is contained in:
AmirHossein Mahmoodi
2023-12-20 10:07:49 +03:30
parent 1cdfa1c2da
commit 49afdec0a0
11 changed files with 156 additions and 77 deletions

View File

@@ -0,0 +1,12 @@
import {parse} from "next-useragent";
export const globalServerProps = async ({req, locale}) => {
const {isBot} = parse(req.headers["user-agent"]);
return {
config: (await import(`&/config.json`)).default,
messages: (await import(`&/locales/${locale}/app.json`)).default,
isBot,
locale,
}
}