Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Env vars from query #16

Merged
merged 5 commits into from
Apr 14, 2024
Merged

feat: Env vars from query #16

merged 5 commits into from
Apr 14, 2024

Conversation

hrk091
Copy link

@hrk091 hrk091 commented Dec 12, 2023

環境変数で指定している値を、全てquery stringからoverrideできるようにしました。
NEXT_PUBLIC_XXX となっている場合、XXXの部分をcamelCaseにしてqueryに追加してもらえたら、overrideできます。
debugだけではなく、excludedTalks や transTimePageX の差し替えなどもできます。

CNDT2023で必須の修正ではないと思うので、カンファレンスが終わった後でmergeでも良さそうです。

Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
emtec-intermission ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 4:41am
web-interlude ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 4:41am

conf.eventAbbr = vars.eventAbbr
}
if (vars.transTimePage1) {
conf.transTimePage1 = parseFloat(vars.transTimePage1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gaku-Kunimi
元々parseIntを使っていて小数点以下が破棄されていたのを、parseFloatに直したので、 #14 が直っているかもしれません。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おぉ、なるほど
見てみます!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

再現させる環境の都合上マージして確認しちゃいます!

@hrk091
Copy link
Author

hrk091 commented Dec 12, 2023

menu画面から各幕間ページに行くときに、query parameterが維持されるようにしました

Copy link

@Gaku-Kunimi Gaku-Kunimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上書きできることを確認しました
これは便利で助かります!

@Gaku-Kunimi Gaku-Kunimi merged commit 4f7fee0 into main Apr 14, 2024
5 checks passed
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.

debug on/offなどをクエリパラメーターから変更できるようにする
2 participants