Add WhatsApp feature flag and improve onboarding

- Add getFeatureFlags endpoint to check if WhatsApp is enabled
- Skip phone step in onboarding when WhatsApp is disabled
- Hide WhatsApp notification options when disabled
- Add ExpertiseSelect component with predefined ocean conservation tags
- Fix onboarding layout to fill viewport on desktop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 00:58:22 +01:00
parent 4f0531d2ee
commit 41a36f72b3
2 changed files with 48 additions and 15 deletions

View File

@@ -19,6 +19,22 @@ function categorizeModel(modelId: string): string {
}
export const settingsRouter = router({
/**
* Get public feature flags (no auth required)
* These are non-sensitive settings that can be exposed to any user
*/
getFeatureFlags: protectedProcedure.query(async ({ ctx }) => {
const [whatsappEnabled] = await Promise.all([
ctx.prisma.systemSettings.findUnique({
where: { key: 'whatsapp_enabled' },
}),
])
return {
whatsappEnabled: whatsappEnabled?.value === 'true',
}
}),
/**
* Get all settings by category
*/