Skip to content

fix: icons#275

Merged
weiber2002 merged 1 commit intoNTUEE-PLUS:mainfrom
matxtam:fix-icons
Mar 19, 2025
Merged

fix: icons#275
weiber2002 merged 1 commit intoNTUEE-PLUS:mainfrom
matxtam:fix-icons

Conversation

@matxtam
Copy link
Collaborator

@matxtam matxtam commented Feb 18, 2025

What is this PR for?

CIcon does not show throughout local website. This PR solves this problem.

What type of PR is it?

Bug Fix

The problem is:

CIcon does not show throughout local website. Basically EVERY doesn't show.

After some experiments, I've found that:

  • <CIcon icon="cil-menu"/> doesn't work, but
  • <CIcon icon={React.icons.cilMenu}/> works.

I'm not sure why this happen. A few years ago there's no such problem but now.

Here's some assumptions:

  1. Some modules are outdated.
  2. CIcon simply doesn't support the "string" way anymore.

For assumption 1, I've tried:

  • asking other two people clone the newest repo and run the app locally. Their icons don't show either.
  • using node version 16 and reinstall node modules, but the icons still doesn't show.
  • clone coreui-free-react-admin-template, i.e. the original repo that EndOfWeb forked from, and copy the file structure into the repo. The icons don't show.

The above approaches fail to solve this problem. Hence, I would rather believe that the "string" API is no more supported though I find no documentation stating this issue.

What I actually did is:

simply turn each <CIcon icon="whatever-icon-it-is"/> into <CIcon icon={React.icons.whateverIconItIs}/>, 135 icons in total.

What is the Jira issue?

(btw, our Jira seems broken)

@weiber2002
Copy link
Collaborator

good, function work!

Copy link
Collaborator

@weiber2002 weiber2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good, function works!

@weiber2002 weiber2002 merged commit 5dd0b69 into NTUEE-PLUS:main Mar 19, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants