12 lines
336 B
JavaScript
12 lines
336 B
JavaScript
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,
|
|
}
|
|
} |