Skip to content

Commit

Permalink
fix issues with runtime config
Browse files Browse the repository at this point in the history
  • Loading branch information
sharknoon committed May 7, 2024
1 parent 77b7d64 commit 708ea1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NUXT_PUBLIC_PIXELHOBBY_TILE_ID=35007450218648
NUXT_PUBLIC_API_URL=https://example.com/api/v1/progress
2 changes: 1 addition & 1 deletion components/tools/OrderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function order() {
};
});
const tile = {
id: runtimeConfig.public.pixelhobbTileId,
id: runtimeConfig.public.pixelhobbyTileId,
quantity: props.tiles.length,
};
body.push(tile);
Expand Down
5 changes: 2 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ export default defineNuxtConfig({
css: ["bootstrap/dist/css/bootstrap.min.css", "/assets/main.css"],
runtimeConfig: {
public: {
apiUrl: process.env.PIXINA_API_URL,
pixelhobbTileId:
parseInt(process.env.PIXINA_PIXELHOBBY_TILE_ID ?? "") || 35007450218648,
apiUrl: "", // can be overwritten by NUXT_PUBLIC_API_URL environment variable
pixelhobbyTileId: 35007450218648, // can be overwritten by NUXT_PUBLIC_PIXELHOBBY_TILE_ID environment variable
},
},
modules: [
Expand Down

0 comments on commit 708ea1e

Please sign in to comment.