Skip to content

Commit

Permalink
🎨 add an example of the usetranslation
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineKM committed Aug 29, 2022
1 parent a491413 commit 9fa4a3c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/with-typescript/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styles from "../styles/Home.module.css";
import useTranslation from "@onruntime/next-usetranslation";

const Home: NextPage = () => {
useTranslation();
const { t } = useTranslation();
return (
<div className={styles.container}>
<Head>
Expand All @@ -15,9 +15,7 @@ const Home: NextPage = () => {
</Head>

<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<h1 className={styles.title}>{t("welcome")}</h1>

<p className={styles.description}>
{"Get started by editing "}
Expand Down

0 comments on commit 9fa4a3c

Please sign in to comment.