voyageglobal / voyage-backend

The backend for Voyage application. Voyage is a service that allows users to plan their trips and look for relevant knowledge about cities.
3 stars 0 forks source link

BE + FE: Guide categories icons #110

Open adadychanka opened 1 day ago

adadychanka commented 1 day ago

Add an icon field to the GuideCategory model on the BE side. We will store the icon's name in that field.

Here is an example of the object for the guide category from BE.

{
      "key": "nature",
      "name": "Nature",
      "imageUrl": "https://example.com/nature.jpg",
      "iconName": "alarm-clock"
 }

On the client side, this icon name will be consumed and used with a generic icon component built on top of Lucide lib Here is the guide how to create generic component for dynamic icons - https://lucide.dev/guide/packages/lucide-react#with-dynamic-imports

adadychanka commented 18 hours ago

The field has been added and deployed and is ready to consume.

@min-in-zon Use the following installation guide - https://lucide.dev/guide/packages/lucide-react#installation Then use the following guide to add DynamicIcon component to consume icons from the backend - https://lucide.dev/guide/packages/lucide-react#with-dynamic-imports