Skip to content

Commit

Permalink
fix: tidy index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Ellison committed May 17, 2023
1 parent 6fb1f43 commit 09493d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 104 deletions.
1 change: 0 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
105 changes: 2 additions & 103 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,8 @@ return (



const cards = [1, 2, 3, 4, 5, 6, 7, 8, 9];

// const theme = createTheme();

export default function Home() {
// const theme = useTheme();

const [padList, setPadList] = useState(0);
const [refreshToken, setRefreshToken] = useState(Math.random());

Expand All @@ -88,7 +84,6 @@ export default function Home() {
.then((res) => res.json())
.then(data => {
setPadList(data.pads)
// console.log('data : ', data )
})
.catch(error => {
console.log(error)
Expand Down Expand Up @@ -156,109 +151,13 @@ export default function Home() {
</Grid>


{/* <Grid container spacing={4}>
{cards.map((card) => (
<Grid item key={card} xs={12} sm={6} md={4}>
<Card
sx={{ height: '100%', display: 'flex', flexDirection: 'column' }}
>
<CardMedia
component="img"
sx={{
// 16:9
pt: '56.25%',
}}
image="https://source.unsplash.com/random"
alt="random"
/>
<CardContent sx={{ flexGrow: 1 }}>
<Typography gutterBottom variant="h5" component="h2">
Heading
</Typography>
<Typography>
This is a media card. You can use this section to describe the
content.
</Typography>
</CardContent>
<CardActions>
<Button size="small">View</Button>
<Button size="small">Edit</Button>
</CardActions>
</Card>
</Grid>
))}
</Grid> */}
</Container>
</main>
{/* Footer */}
<Box sx={{ bgcolor: 'background.paper', p: 6 }} component="footer">
{/* <Typography variant="h6" align="center" gutterBottom>
Footer
</Typography>
<Typography
variant="subtitle1"
align="center"
color="text.secondary"
component="p"
>
Something here to give the footer a purpose!
</Typography> */}
<Copyright />
</Box>
{/* End footer */}
</ThemeProvider>
);
}








// export default function () {
// const [padList, setPadList] = useState(0);
// const [refreshToken, setRefreshToken] = useState(Math.random());

// useEffect(() => {
// fetch(`/api/etherpad/listAllPads`)
// .then((res) => res.json())
// .then(data => {
// setPadList(data.pads)
// // console.log('data : ', data )
// })
// .catch(error => {
// console.log(error)
// })
// .finally(() => {
// setTimeout(() => setRefreshToken(Math.random()), 5000);
// });

// }, [refreshToken]);


// return (
// <>

// <br />
// {padList ? (
// <>


// Available pads from Etherpad:
// <br />
// <h2>Presentations</h2>
// {
// padList.map((pad, i) => (
// <Box key={i}>
// <Link href={`/pads/ppt/${pad}`}>{pad}</Link>
// </Box>
// ))
// }
// </>
// ) : 'Etherpad is not running'
// }
// </>
// )
// }
}

0 comments on commit 09493d3

Please sign in to comment.