Skip to content

Commit

Permalink
linkでスクロールしないようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
na-trium-144 committed Aug 28, 2023
1 parent 5b275d5 commit 65c0680
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/ruleitem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const RuleItemActive = (props: {
<Grid item xs={12} sm="auto">
<Typography variant="h5">
{rule.num}
<Link href={`/rulebook?num=${rule.num}`}>
<Link href={`/rulebook?num=${rule.num}`} scroll={false}>
<IconButton
onClick={() => {
navigator?.clipboard
Expand Down
7 changes: 6 additions & 1 deletion pages/rulebook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ export default function RuleBook() {
}}
>
{rules.map((r, i) => (
<Link key={i} href={`/rulebook?num=${r.num}`} legacyBehavior>
<Link
key={i}
href={`/rulebook?num=${r.num}`}
legacyBehavior
scroll={false}
>
<MenuItem
onClick={() => {
setMenuAnchorEl(null);
Expand Down

0 comments on commit 65c0680

Please sign in to comment.