Fakultas Ilmu Komputer UI

Commit 4c98beec authored by Ryo Axtonlie's avatar Ryo Axtonlie
Browse files

Merge branch 'ryo' into 'master'

fix cannot see topic page if user not logged in

See merge request !25
parents 98c67a46 c417e9b2
......@@ -9,7 +9,7 @@ import AuthService from '../../helpers/services/auth.service';
export default function TopicList(props) {
const [topics, setTopics] = useState([]);
const isAdmin = AuthService.getCurrentUser().data.role
const isAdmin = loggedIn ? AuthService.getCurrentUser().data.role : "unregistered";
useEffect(() => {
const fetch = async () => {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment