Skip to content

Commit

Permalink
feat: open pad in new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Ellison committed May 17, 2023
1 parent 65cf535 commit f496458
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions layouts/SlidePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ function SlidePage({ children, next }) {
setMode(MODES.SLIDESHOW);
router.push(
router.pathname,
`${router.asPath.split("?")[0]}?mode=${MODES.SLIDESHOW}#${currentSlide}`,
`${router.asPath.split("?")[0]}?format=ppt&mode=${MODES.SLIDESHOW}#${currentSlide}`,
{ shallow: true }
);
} else {
setMode(MODES.SPEAKER);
router.push(
router.pathname,
`${router.asPath.split("?")[0]}?mode=${MODES.SPEAKER}#${currentSlide}`,
`${router.asPath.split("?")[0]}?format=ppt&mode=${MODES.SPEAKER}#${currentSlide}`,
{ shallow: true }
);
}
Expand Down Expand Up @@ -138,7 +138,7 @@ function SlidePage({ children, next }) {
useEffect(() => {
router.push(
`${router.asPath}`,
`${router.asPath.split("?")[0]}?mode=${mode}#${currentSlide}`
`${router.asPath.split("?")[0]}?format=ppt&mode=${mode}#${currentSlide}`
);
}, [currentSlide, mode, router.pathname]);

Expand Down
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ return (
{/* <Button href={`/pads/print/${children}`}size="small">Print</Button> */}
<Button href={`/output/pad/${children}?format=ppt`} size="small">PPT</Button>
<Button href={`/output/pad/${children}?format=doc`}size="small">Doc</Button>
<Button href={`https://pad.airview.airwalkconsulting.io/p/${children}`} size="small">Edit</Button>
<Button href={`https://pad.airview.airwalkconsulting.io/p/${children}`} rel="noopener noreferrer" target="_blank" size="small">Edit</Button>
</CardActions>
</Card>
</Grid>
Expand Down

0 comments on commit f496458

Please sign in to comment.