-
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.
Merge pull request #31 from handong-app/junglesub/feat/admin-things
지연되는 상황으로 인해 먼저 머지
- Loading branch information
Showing
21 changed files
with
920 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,43 @@ | ||
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"; | ||
|
||
function AdminFeed() { | ||
const [allFeeds, hasMore, loadData] = useLoadData(); | ||
|
||
return ( | ||
<AdminPage> | ||
<InfiniteScroll | ||
loadMore={loadData} | ||
hasMore={hasMore} | ||
loader={Array(1) | ||
.fill() | ||
.map((_, index) => ( | ||
<FeedCard key={index} loading /> | ||
))} | ||
> | ||
{allFeeds.map((item) => ( | ||
// <FeedItemNew | ||
// key={item.id} | ||
// item={item} | ||
// setAllSeenFeedId={setAllSeenFeedId} | ||
// /> | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
}} | ||
> | ||
<Box sx={{ flexGrow: 1, maxWidth: 500 }}> | ||
<FeedCard key={item.id} item={item} /> | ||
</Box> | ||
<Paper sx={{ flexGrow: 1, my: "16px", ml: 2 }}>Hello!</Paper> | ||
</Box> | ||
))} | ||
</InfiniteScroll> | ||
</AdminPage> | ||
); | ||
} | ||
|
||
export default AdminFeed; |
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; |
Oops, something went wrong.