-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
113 additions
and
65 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
import { Link } from 'next-view-transitions' | ||
'use client' | ||
|
||
import { useTransitionRouter } from 'next-view-transitions' | ||
|
||
export default function Page() { | ||
const router = useTransitionRouter() | ||
return ( | ||
<div className='demo-box'> | ||
<h2> | ||
This is the <span className='demo'>Demo</span> | ||
This is the <span className='demo'>demo</span> | ||
</h2> | ||
<p>OK you just saw the demo :)</p> | ||
<Link href='/'>Open homepage →</Link> | ||
<a | ||
href='/' | ||
onClick={(e) => { | ||
e.preventDefault() | ||
router.back() | ||
}} | ||
> | ||
← Back to homepage | ||
</a> | ||
</div> | ||
) | ||
} |
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