# useEntities
Gets the information from the entities.json
based on the given expectedEntity
.
expectedEntity
can be either a Ref
or the string
. Can be in all types of cases, but camelCase
is preferred.
# entities.json
The four scenarios:
{
"customers": "fa-user-card", // Scenario 1
"users": {
// Scenario 2
"icon": "fa-user-card"
},
"tower-types": {
// Scenario 3
"url": "/all-tower-types"
}
// Scenario 4: not specified
}
Scenarios:
- Scenario 1: In this case the
url
forcustomers
will be/customers
and theicon
will befa-user-card
. - Scenario 2: In this case the
url
forusers
will be/users
and theicon
will befa-user-card
. - Scenario 3: In this case the
url
fortower-types
will be/all-tower-types
and theicon
will befa-list
. - Scenario 4: In this case the
url
forconductors
(not specified at all) will be/conductors
and theicon
will befa-list
.