Skip to content

Commit 5111f35

Browse files
authored
Feature: Default currency symbol (#259)
* Added a env parameter to define a default currency symbol * Fixed prettier formatting
1 parent 4db7886 commit 5111f35

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
POSTGRES_PRISMA_URL=postgresql://postgres:1234@localhost
2-
POSTGRES_URL_NON_POOLING=postgresql://postgres:1234@localhost
2+
POSTGRES_URL_NON_POOLING=postgresql://postgres:1234@localhost
3+
4+
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL=""

src/components/group-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function GroupForm({
6767
: {
6868
name: '',
6969
information: '',
70-
currency: '',
70+
currency: process.env.NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL || '',
7171
participants: [
7272
{ name: t('Participants.John') },
7373
{ name: t('Participants.Jane') },

src/lib/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const envSchema = z
2121
interpretEnvVarAsBool,
2222
z.boolean().default(false),
2323
),
24+
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL: z.string().optional(),
2425
S3_UPLOAD_KEY: z.string().optional(),
2526
S3_UPLOAD_SECRET: z.string().optional(),
2627
S3_UPLOAD_BUCKET: z.string().optional(),

0 commit comments

Comments
 (0)