changed hook to put the resource on top of the sidebar