15 lines
419 B
JavaScript
15 lines
419 B
JavaScript
import getConfig from 'next/config';
|
|
import { publicRuntimeConfigSchema } from '../config/schema/runtime-config';
|
|
import { COLORS_DEV, COLORS_PROD } from '../constants/colors';
|
|
|
|
const { publicRuntimeConfig } = getConfig();
|
|
const { USE_DEV_COLORS } = publicRuntimeConfigSchema.parse(publicRuntimeConfig);
|
|
|
|
export default function getColors() {
|
|
if (USE_DEV_COLORS) {
|
|
return COLORS_DEV;
|
|
}
|
|
|
|
return COLORS_PROD;
|
|
}
|