-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): make add page for files
- Loading branch information
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |