{{ screening.patient_info.phones.0.number }}
where 0
is index position.
{{ screening.patient_info.phones.0.number }}
where 0
is index position.
You want the environment: browser
that includes window
.
Update the env section of your .eslintrc.js
file to include it:
env: {
browser: true,
},
Since Next.js runs code in both the browser and server (Node.js) environments, you'll want both node
and browser
environments:
env: { node: true, browser: true, },
In Handlebars, you can do something like this:
<td>
{{#if condition}}
<button>Is Owner</button>
{{else}}
<button>Not Owner</button>
{{/if}}
</td>
Based on the condition
value you pass to the template, one or the other version of the button will be used.
You're looking for the {{#unless}} helper. It serves as the inverse of the if
helper you're attempting to use.
You could use it like this in your Handlebars code:
{{#unless condition}}
<button>Submit</button>
{{/unless}}
This would show the <button>
element when the condition
you provide to the helper is falsey. Otherwise, it would render nothing.