fix bug when reactroot is not available
add modal component