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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user