Last active
January 11, 2022 09:47
-
-
Save vkbansal/284aa4e3dbaba950487258df75050165 to your computer and use it in GitHub Desktop.
string-ext-05
This file contains hidden or 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
// index.tsx | |
import HomePage from "./HomePage"; | |
import AboutPage from "./AboutPage"; | |
import Nav from "./Nav"; | |
+ import strings from "./strings.yaml"; | |
+ import { StringsContextProvider } from "./StringsContext"; | |
function App() { | |
return ( | |
+ <StringsContextProvider data={strings}> | |
<div style={{ maxWidth: "500px" }}> | |
<Nav /> | |
<Routes> | |
<Route path="/" element={<HomePage />} /> | |
<Route path="/about" element={<AboutPage />} /> | |
</Routes> | |
</div> | |
+ </StringsContextProvider> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment