Add new pages and refactor existing code

This commit adds new Admin and Accounts pages, while also improving code by refactoring various portions such as extracting services from the join page and dynamically importing packages in logging and monitoring code. The build command is also removed from the WordPress package, and SWC minification is enabled in the Next.js configuration. Updated marketing content is also included in this commit.
This commit is contained in:
giancarlo
2024-04-08 11:47:26 +08:00
parent c77c9295c3
commit 2b447167f7
15 changed files with 154 additions and 89 deletions

View File

@@ -17,7 +17,6 @@ const DEFAULT_INSTRUMENTATION_PROVIDER = process.env
* Please set the MONITORING_INSTRUMENTATION_PROVIDER environment variable to register the monitoring instrumentation provider.
*/
export async function registerInstrumentation() {
// Only run instrumentation in Node.js environment
if (
process.env.NEXT_RUNTIME !== 'nodejs' ||
!DEFAULT_INSTRUMENTATION_PROVIDER
@@ -39,6 +38,8 @@ export async function registerInstrumentation() {
}
default:
throw new Error(`Unknown instrumentation provider`);
throw new Error(
`Unknown instrumentation provider: ${DEFAULT_INSTRUMENTATION_PROVIDER as string}`,
);
}
}