Feature: Default currency symbol (#259)

* Added a env parameter to define a default currency symbol

* Fixed prettier formatting
This commit is contained in:
Sebastian Goscinski
2024-12-07 17:07:54 +01:00
committed by GitHub
parent 4db788680e
commit 5111f3574f
3 changed files with 5 additions and 2 deletions

View File

@@ -1,2 +1,4 @@
POSTGRES_PRISMA_URL=postgresql://postgres:1234@localhost POSTGRES_PRISMA_URL=postgresql://postgres:1234@localhost
POSTGRES_URL_NON_POOLING=postgresql://postgres:1234@localhost POSTGRES_URL_NON_POOLING=postgresql://postgres:1234@localhost
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL=""

View File

@@ -67,7 +67,7 @@ export function GroupForm({
: { : {
name: '', name: '',
information: '', information: '',
currency: '', currency: process.env.NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL || '',
participants: [ participants: [
{ name: t('Participants.John') }, { name: t('Participants.John') },
{ name: t('Participants.Jane') }, { name: t('Participants.Jane') },

View File

@@ -21,6 +21,7 @@ const envSchema = z
interpretEnvVarAsBool, interpretEnvVarAsBool,
z.boolean().default(false), z.boolean().default(false),
), ),
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL: z.string().optional(),
S3_UPLOAD_KEY: z.string().optional(), S3_UPLOAD_KEY: z.string().optional(),
S3_UPLOAD_SECRET: z.string().optional(), S3_UPLOAD_SECRET: z.string().optional(),
S3_UPLOAD_BUCKET: z.string().optional(), S3_UPLOAD_BUCKET: z.string().optional(),