mirror of
https://github.com/kou029w/_.git
synced 2025-01-30 22:08:02 +00:00
next/linkを使う
This commit is contained in:
parent
5a8fe9e9e8
commit
f054071602
2 changed files with 8 additions and 2 deletions
|
@ -1,9 +1,12 @@
|
|||
import React from "react";
|
||||
import Link from "next/link";
|
||||
|
||||
const About: React.FC = () => (
|
||||
<article>
|
||||
<h1>About</h1>
|
||||
<a href="/">Back to Home</a>
|
||||
<Link href="/">
|
||||
<a>Back to Home</a>
|
||||
</Link>
|
||||
</article>
|
||||
);
|
||||
export default About;
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import React from "react";
|
||||
import Link from "next/link";
|
||||
|
||||
const Home: React.FC = () => (
|
||||
<article>
|
||||
<h1>Hello Next.js</h1>
|
||||
<a href="/about">/about</a>
|
||||
<Link href="/about">
|
||||
<a>/about</a>
|
||||
</Link>
|
||||
</article>
|
||||
);
|
||||
export default Home;
|
||||
|
|
Loading…
Add table
Reference in a new issue