Skip to content

Conversation

@KarolinaKopacz
Copy link
Contributor

Description:
Add API calls to building block table component.
Ticket: https://govstack-global.atlassian.net/browse/TECH-318

Implemented solution detail:
with error fetching data
Zrzut ekranu 2023-03-8 o 19 16 33

without error
Zrzut ekranu 2023-03-8 o 19 16 12

<div></div>
<div className='sub-table-row-bb' data-testid='bb-name'>
<BBImage imagePath={buildingBlock.buildingBlock} />
<p>{(buildingBlock.buildingBlock).replace(/bb-|-/g, ' ')}</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of manipulating a string, I would prefer a service/function that handles mapping from identifiers received from the server to a user-friendly display string.

We could use the value from the server as a translation key (bb-digital-registries), if no translation is found we could fall back to string manipulation as you did in the current solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like your idea! I'm going to handle it while working on a ticket

@dszafranek dszafranek merged commit 3d251b5 into main Mar 9, 2023
@mdulko-soldevelo mdulko-soldevelo deleted the TECH-318/AddAPICallsToBuildingBlockTable branch July 11, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants