kundankumar it looks like your code is quite complicated, and trying to handle things that should not need to be handled (like fetching things directly from our REST API, manipulating JAQL, filters etc)
If you want to embed a dashboard, you can simply use the `DashboardById` component as a child of `SisenseContextProvider` as in this example
Similarly, if you just want widgets as individual components and not in a dashboard, then use WidgetById as in this example
If you want to first get the dashboard, make some changes and then render the result, you may prefer the `useGetDashboardModel` hook + `Dashboard` component combination as in this example
I see you have some of these elements in the code already, but also a lot more other stuff (registerCustomWidget, CustomHistogramWidget, api calls, jaql manipulation etc) which can make it confusing and hard to read / follow.
Hopefully the links help to simplify the approach for your intended use case... if you still get stuck using those then please reply back with a cleaner code example, the intended use case, and describe the problem you're facing.