Skip to content

Commit

Permalink
Feature: Default currency symbol (#259)
Browse files Browse the repository at this point in the history
* Added a env parameter to define a default currency symbol

* Fixed prettier formatting
  • Loading branch information
sebiweise authored Dec 7, 2024
1 parent 4db7886 commit 5111f35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
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=""
2 changes: 1 addition & 1 deletion src/components/group-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function GroupForm({
: {
name: '',
information: '',
currency: '',
currency: process.env.NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL || '',
participants: [
{ name: t('Participants.John') },
{ name: t('Participants.Jane') },
Expand Down
1 change: 1 addition & 0 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const envSchema = z
interpretEnvVarAsBool,
z.boolean().default(false),
),
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL: z.string().optional(),
S3_UPLOAD_KEY: z.string().optional(),
S3_UPLOAD_SECRET: z.string().optional(),
S3_UPLOAD_BUCKET: z.string().optional(),
Expand Down

0 comments on commit 5111f35

Please sign in to comment.