🚧 wip migrate to next-i18n

This commit is contained in:
Manuel Ruwe
2022-08-22 09:50:54 +02:00
parent ac4dc23e08
commit 6d0a31f79e
61 changed files with 817 additions and 753 deletions

View File

@@ -1,7 +1,7 @@
import path from 'path';
import fs from 'fs';
export function getConfig(name: string) {
export function getConfig(name: string, props: any = undefined) {
// Check if the config file exists
const configPath = path.join(process.cwd(), 'data/configs', `${name}.json`);
if (!fs.existsSync(configPath)) {
@@ -30,6 +30,7 @@ export function getConfig(name: string) {
props: {
configName: name,
config: JSON.parse(config),
...props,
},
};
}