Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using the top nav logo component with server side rendering, warnings appear in the console #2069

Open
staceyshk opened this issue Nov 7, 2019 · 0 comments

Comments

@staceyshk
Copy link
Contributor

staceyshk commented Nov 7, 2019

index.js:1 Warning: Prop dangerouslySetInnerHTML did not match. Server: "<img src="/static/autobadlogo-cropped.png" alt="autobad logo" width="30"><h1 style="display:inline-block;margin:0;font-size:16px;line-height:16px;font-weight:400" class="css-oswdbz">utoBAD" Client: ""

I looked in the presenter and found

https://github.com/Autodesk/hig/blob/development/packages/top-nav/src/presenters/LogoPresenter.js#L34

However I'm not quite sure what's going on. Needs further investigation. It might require {{__html: ''}}

code snippet

<TopNav
    logo={
      // There is a logo component, but I found I received errors while using it
      <Logo link='/'>
        <img src="/static/autobadlogo-cropped.png" alt="autobad logo" width="30"/><LogoText>utoBAD</LogoText>
      </Logo>
    } /> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant