Skip to content

Commit

Permalink
feat(client): make add page for files
Browse files Browse the repository at this point in the history
  • Loading branch information
junglesub committed Oct 28, 2024
1 parent 55338c8 commit 636e44b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
Empty file.
71 changes: 71 additions & 0 deletions src/main/front/src/admin/Files/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import * as React from "react";
import PropTypes from "prop-types";
import Tabs from "@mui/material/Tabs";
import Tab from "@mui/material/Tab";
import Box from "@mui/material/Box";

function CustomTabPanel(props) {
const { children, value, index, ...other } = props;

return (
<div
role="tabpanel"
hidden={value !== index}
id={`simple-tabpanel-${index}`}
aria-labelledby={`simple-tab-${index}`}
{...other}
>
{value === index && <Box sx={{ p: 3 }}>{children}</Box>}
</div>
);
}

CustomTabPanel.propTypes = {
children: PropTypes.node,
index: PropTypes.number.isRequired,
value: PropTypes.number.isRequired,
};

function a11yProps(index) {
return {
id: `simple-tab-${index}`,
"aria-controls": `simple-tabpanel-${index}`,
};
}

export default function AdminFilesComp() {
const [value, setValue] = React.useState(1);

const handleChange = (event, newValue) => {
setValue(newValue);
};

return (
<Box sx={{ width: "100%" }}>
<Box sx={{ borderBottom: 1, borderColor: "divider" }}>
<Tabs
value={value}
onChange={handleChange}
aria-label="basic tabs example"
variant="scrollable"
scrollButtons="auto"
>
<Tab disabled label="대시보드" {...a11yProps(0)} />
<Tab label="형식이 없는 파일" {...a11yProps(1)} />
<Tab label="일치하지 않는 파일" {...a11yProps(2)} />
<Tab label="사용되지 않는 파일" {...a11yProps(3)} />
<Tab label="전체파일" {...a11yProps(4)} />
</Tabs>
</Box>
<CustomTabPanel value={value} index={0}>
Item One
</CustomTabPanel>
<CustomTabPanel value={value} index={1}>
Item Two
</CustomTabPanel>
<CustomTabPanel value={value} index={2}>
Item Three
</CustomTabPanel>
</Box>
);
}
16 changes: 16 additions & 0 deletions src/main/front/src/pages/admin/AdminFiles.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import InfiniteScroll from "react-infinite-scroller";
import AdminPage from "./AdminPage";
import FeedCard from "../../components/FeedCard";
import useLoadData from "../../hooks/useLoadData";
import { Box, Paper } from "@mui/material";
import AdminFilesComp from "../../admin/Files";

function AdminFiles() {
return (
<AdminPage>
<AdminFilesComp />
</AdminPage>
);
}

export default AdminFiles;

0 comments on commit 636e44b

Please sign in to comment.