Using createResource conditionally - SolidJS