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

[BUG] Logo not rendering #6655

Closed
fellipeamedeiros opened this issue Jan 21, 2025 · 2 comments
Closed

[BUG] Logo not rendering #6655

fellipeamedeiros opened this issue Jan 21, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@fellipeamedeiros
Copy link

Describe the bug

Hi everyone im trying to change the default logo, but when i put the new one, the URL is just printed not rendered.

Steps To Reproduce

  1. add new line on object <Refine at App.tsx

Example

<Refine
routerProvider={routerProvider}
notificationProvider={useNotificationProvider}
authProvider={authProvider}
resources={resources}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
liveMode: "auto",
useNewQueryKeys: true,
title: {icon: "https://avataaars.io/?avatarStyle=Circle&topType=ShortHairShortFlat&accessoriesType=Blank&hairColor=BrownDark&facialHairType=Blank&clotheType=BlazerShirt&eyeType=Default&eyebrowType=RaisedExcitedNatural&mouthType=Default&skinColor=Light"}
}}
>

Expected behavior

Icon rendered

Packages

"@refinedev/antd": "^5.45.1",
"@refinedev/cli": "^2.16.42",
"@refinedev/core": "^4.57.1",
"@refinedev/nestjs-query": "^1.3.5",
"@refinedev/react-router-v6": "^4.6.2",

Additional Context

No response

@fellipeamedeiros fellipeamedeiros added the bug Something isn't working label Jan 21, 2025
@alicanerdurmaz
Copy link
Member

Hello @fellipeamedeiros,

icon type is React.ReactNode, It means you need to pass React component.

You can use like this:

options={{
  title: {
    icon: (
      <img
        style={{
          width: 24,
          height: 24,
        }}
        src="https://avataaars.io/?avatarStyle=Circle&topType=ShortHairShortFlat&accessoriesType=Blank&hairColor=BrownDark&facialHairType=Blank&clotheType=BlazerShirt&eyeType=Default&eyebrowType=RaisedExcitedNatural&mouthType=Default&skinColor=Light%22%7D"
      />
    ),
  },
}}
screenshot of refine with ant design example

@fellipeamedeiros
Copy link
Author

Thanks @alicanerdurmaz works perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants