Skip to content

Conversation

@sebiweise
Copy link
Contributor

@sebiweise sebiweise commented Oct 24, 2024

In this PR I´ve added a env parameter that can be used to define a default currency symbol on group creation. The symbol can still be changed on creation by inserting another symbol into the input field.

The following variables were added:

VAR name Default Description
NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL none This parameter can be used to define a default currency symbol that will be used on group creation.

ToDo:
Currently the env var is defined directly via currency: process.env.NEXT_PUBLIC_DEFAULT_CURRENCY_SYMBOL || '', and not via the env.ts file. It is working fine, but we are missing the validation of zod. I wasn´t able to define the variable via the env.ts file, because some of the vars are missing on the clientside. Maybe we will have to seperate this config file or is there any other solution of doing this?

@sebiweise
Copy link
Contributor Author

Maybe we could use this example to implement client, server and runtime based env validation?
https://github.com/lukevella/rallly/blob/9bbd8e0790ca0ded029ff565c9ca3cb73791fae1/apps/web/src/env.ts

@scastiel
Copy link
Member

scastiel commented Dec 7, 2024

Nice, thanks @sebiweise!

@scastiel scastiel merged commit 5111f35 into spliit-app:main Dec 7, 2024
@sebiweise sebiweise deleted the feature/default_currency_symbol branch December 7, 2024 17:35
Lipkin10 pushed a commit to Lipkin10/Split-AI-first-version that referenced this pull request Jul 30, 2025
* Added a env parameter to define a default currency symbol

* Fixed prettier formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants