Hi guys, How can I change the texts like "Sign in"...
# general
a
Hi guys, How can I change the texts like "Sign in"... Etc ?
s
You can pass customized components when you initialize SupertTokens on client side. I have choose
ThirdPartyEmailPassword
recipe, i am replacing
EmailPasswordSignInHeader
component with my own. Here is code sample and related [docs](https://supertokens.io/docs/thirdpartyemailpassword/advanced-customizations/react-component-override/usage)
Copy code
SuperTokens.init({
  // appInfo: {...},
  recipeList: [
      ThirdPartyEmailPassword.init({
          override: {
              components: {

                  EmailPasswordSignInHeader: ({ onClick }) => {

                      return (
                          <Box>
                              <Typography variant="h5" >
                                  Zaloguj się
                              </Typography>
                              <Typography variant="subtitle1">
                                  lub przejdź do <Link href="/rejestracja" onClick={(e) => {
                                      e.preventDefault()
                                      onClick()
                                  }} > rejestracji </Link>
                              </Typography>
                              <Box mt={1} mb={2}>
                                  <Divider />

                              </Box>
                          </Box>
                      )
                  }
              }
          }
      })
  ]
});
or as @User mentioned in his second solution, you can manipulate DOM with pure JavaScript but i think its better to pass your own component.Reacts main function as a library is to manipulate DOM
r
Thank you for the detailed help @smoleniuch
a
Will try it later, thanks for your help!
4 Views