bukalapak/snowboard

Playground Panel visibility problem with more environments

pavelgajdos opened this issue · 0 comments

The documentation says to set playground: false in an environment section. It is ignored IMO.

My config is:

...
    playground: {
      enabled: true,
      env: "production",
      environments: {
        production: {
          url: "https://example.com",
          playground: false
        },
        mock: {
          url: "https://example.com",
          auth: {
            name: "apikey",
            options: {
              key: "api-dev-key",
              header: "X-Api-Key"
            }
          }
        }
      }
    }
....

The playground panel is visible no matter which environment is selected.

I fixed it by wrapping the whole CollapsiblePanel inside PlaygroundPanel in {#if environment.playground !== false} statement. I am not sure whether this is the best approach as I am not used to Svelte framework.

Thank you :-)