Created
January 11, 2022 09:58
-
-
Save vkbansal/057d643984054484a50af9b96f71a923 to your computer and use it in GitHub Desktop.
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
// HomePage.tsx | |
import React from "react"; | |
- import { useLocaleStrings } from "./StringsContext"; | |
+ import { useLocaleStrings, LocaleString } from "./StringsContext"; | |
export default function HomePage(): React.ReactElement { | |
const { getString } = useLocaleStrings(); | |
return ( | |
<div> | |
<h1>Home</h1> | |
<p>{getString("homePageContent.para1")}</p> | |
- <p> | |
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit | |
- soluta aliquam sit aliquid qui possimus? Doloremque voluptatibus | |
- perferendis, quas laboriosam alias eum minus pariatur, temporibus ab | |
- sequi facilis eaque numquam. | |
- </p> | |
+ <LocaleString strKey="homePageContent.para2" as="p" /> | |
<p> | |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo | |
optio, fuga cum velit corporis ipsam labore saepe assumenda inventore | |
nobis. Laboriosam, cumque blanditiis minima accusantium inventore | |
mollitia dolor optio exercitationem? | |
</p> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment