// ** React Imports import { useEffect } from 'react' import { useParams, Link } from 'react-router-dom' // ** Store & Actions import { getUser } from '../store/action' import { useSelector, useDispatch } from 'react-redux' // ** Reactstrap import { Row, Col, Alert } from 'reactstrap' // ** User View Components import PlanCard from './PlanCard' import UserInfoCard from './UserInfoCard' import UserTimeline from './UserTimeline' import PermissionsTable from './PermissionsTable' // ** Styles import '@styles/react/apps/app-users.scss' const UserView = props => { // ** Vars const store = useSelector(state => state.users), dispatch = useDispatch(), { id } = useParams() // ** Get suer on mount useEffect(() => { dispatch(getUser(parseInt(id))) }, [dispatch]) return store.selectedUser !== null && store.selectedUser !== undefined ? (