All files / src/app/student-page/page/resources Resources.jsx

0% Statements 0/4
0% Branches 0/2
0% Functions 0/2
0% Lines 0/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65                                                                                                                                 
import React from "react";
import AppBar from "@mui/material/AppBar";
import Box from "@mui/material/Box";
import Toolbar from "@mui/material/Toolbar";
import Typography from "@mui/material/Typography";
import Description from "@mui/icons-material/Description";
import BreadcrumbsComponent from "@/utils/components/breadcrumbs/dynamic-breadcrumbs/Breadcrumbs";
import { Icon, ListItem, ListItemButton, ListItemText } from "@mui/material";
 
const Resources = () => {
    const uploadedFiles = [
        {
            name: "file1.png",
        },
        {
            name: "file2.png",
        },
        {
            name: "file3.png",
        },
    ];
 
    return (
        <React.Fragment>
            <Box>
                <AppBar position="relative" color="primary">
                    <Toolbar>
                        <Typography variant="h6">Resources</Typography>
                    </Toolbar>
                </AppBar>
                <BreadcrumbsComponent />
                <Box sx={{ padding: 4 }}>
                    <Box sx={{ width: "35%" }}>
                        {uploadedFiles.length !== 0 ? (
                            uploadedFiles.map((entry, index) => (
                                <ListItem dense key={index} disablePadding>
                                    <ListItemButton
                                        id={`student-resources-list-item-${entry.name}`}
                                        sx={{ display: "flex", gap: "1rem" }}
                                        component="a"
                                        // href={""}
                                        target="_blank"
                                        rel="noopener noreferrer"
                                    >
                                        <Icon>
                                            <Description color="primary" />
                                        </Icon>
                                        <ListItemText primary={entry.name} secondary={""} />
                                    </ListItemButton>
                                </ListItem>
                            ))
                        ) : (
                            <Typography variant="body1" sx={{ opacity: 0.75 }}>
                                No files to display
                            </Typography>
                        )}
                    </Box>
                </Box>
            </Box>
        </React.Fragment>
    );
};
 
export default Resources;