jhipster / generator-jhipster-nodejs

A NodeJS blueprint that creates the backend using NestJS
https://www.npmjs.com/package/generator-jhipster-nodejs
Apache License 2.0
258 stars 80 forks source link

There's a space missing before "sign in" on the homepage #132

Closed mraible closed 4 years ago

mraible commented 4 years ago

Describe the bug

Generate a new app with React and OAuth 2.0. The words are scrunched together. There should be a space before "sign in" on the homepage.

Screen Shot 2020-05-04 at 8 54 08 PM
ghost commented 4 years ago

Hi Matt, Thanks for the feedback. So This blueprint does not modify jhipster clients, so the home page is a copy from client subgenerator. However I notice that the space is due to the missing of a return of getLoginUrl() function:

 <Alert color="warning">
                <Translate contentKey="global.messages.info.authenticated.prefix">If you want to </Translate>
                <%_ if (authenticationType === 'oauth2') { _%>
                <a href={getLoginUrl()} className="alert-link">
                  <Translate contentKey="global.messages.info.authenticated.link">sign in</Translate>
                </a>
                <%_ } else { _%>
                <Link to="/login" className="alert-link"><Translate contentKey="global.messages.info.authenticated.link"> sign in</Translate></Link>
                <%_ } _%>

https://github.com/jhipster/generator-jhipster-nodejs/blob/9552302fd4ce6dcc52845d248bf506d64ecdb9b4/generators/client/templates/react/home/home.tsx.ejs#L55

Any Suggestions?

mraible commented 4 years ago

@amanganiello90 This method just returns a URL. It's import is:

import { getLoginUrl } from 'app/shared/util/url-utils';

Code is:

https://github.com/jhipster/generator-jhipster/blob/master/generators/client/templates/react/src/main/webapp/app/shared/util/url-utils.ts.ejs#L19-L25

ghost commented 4 years ago

Ok, then it is only a space missing in the tag, because the link works. Thanks.

ghost commented 4 years ago

I close it because I have list all the changes in #136