mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 06:18:07 +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 React from "react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
const About: React.FC = () => (
|
const About: React.FC = () => (
|
||||||
<article>
|
<article>
|
||||||
<h1>About</h1>
|
<h1>About</h1>
|
||||||
<a href="/">Back to Home</a>
|
<Link href="/">
|
||||||
|
<a>Back to Home</a>
|
||||||
|
</Link>
|
||||||
</article>
|
</article>
|
||||||
);
|
);
|
||||||
export default About;
|
export default About;
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
const Home: React.FC = () => (
|
const Home: React.FC = () => (
|
||||||
<article>
|
<article>
|
||||||
<h1>Hello Next.js</h1>
|
<h1>Hello Next.js</h1>
|
||||||
<a href="/about">/about</a>
|
<Link href="/about">
|
||||||
|
<a>/about</a>
|
||||||
|
</Link>
|
||||||
</article>
|
</article>
|
||||||
);
|
);
|
||||||
export default Home;
|
export default Home;
|
||||||
|
|
Loading…
Add table
Reference in a new issue