import { fullPageLoadingIndicator } from '../LoadingIndicator';
if (placeOrderLoading){
return fullPageLoadingIndicator;
}
I want to add this in the return as well
window.scrollTo({
top: 0,
behavior: 'smooth'
});
for example this is what I want to return window scroll as well with the loading indicator which is component.
if (placeOrderLoading){
return {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
fullPageLoadingIndicator
};
}
Try putting the component in the return, and if it's a component try: