Skip to content

syntax errors #11

@rizen

Description

@rizen

I believe there are a number of errors on this page: https://docs.boardzilla.io/ui/appearance#responsive-and-mobile

render({
    boardSizes: (screenX, screenY, mobile) => {
      if (mobile) return {
        name: "mobile",
        aspectRatio: 1 / 2
      });
      return {
        name: "standard",
        aspectRatio: 5 / 3
      })
    })
    ...
  });

I think there should be a setup function passed as the first parameter to render.

Also there are a number of unnecessary parens in the code. I believe this is more accurate and has no syntax errors:

render(setup, {
  boardSizes: (screenX, screenY, mobile) => {
    if (mobile) return {
      name: "mobile",
      aspectRatio: 1 / 2
    };
    return {
      name: "standard",
      aspectRatio: 5 / 3
    }
  },
  ...
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions