Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove concept map from mobile version #2

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions website/src/components/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ export default function ButtonAppBar() {
href: '/buckets',
icon: <StorageOutlined />,
},
{
name: 'Concept Map',
href: '/conceptmap',
icon: <AccountTree />,
},
];
const [tabs, updateTabs] = useState(tabList.slice(1));
const [anchorEl, setAnchorEl] = useState(null);
Expand Down
6 changes: 6 additions & 0 deletions website/src/views/conceptMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import './css/conceptMap.css';
import jwtDecode from 'jwt-decode';
import { StudentSelectionContext } from "../components/StudentSelectionWrapper";
import apiv2 from "../utils/apiv2";
import { Typography, useMediaQuery } from "@mui/material";

export default function ConceptMap() {
const [loading, setLoading] = useState(false);
const [studentMastery, setStudentMastery] = useState('000000');
const mobile = useMediaQuery('(max-width:600px)');

const { selectedStudent, setSelectedStudent } = useContext(StudentSelectionContext);

Expand Down Expand Up @@ -44,6 +46,10 @@ export default function ConceptMap() {
return <Loader />;
}

if (mobile) {
return <Typography sx={{fontWeight: "bold"}}>Concept Map is not available on mobile devices</Typography>;
Comment on lines +49 to +50
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we style this a bit?

}

return (
<>
<PageHeader>Concept Map</PageHeader>
Expand Down