reactjsbootstrap-5core-ui

coreui custom components and mobile version logo


I am using https://coreui.io/ free react admin template version 4. Where should we put our own components (that fetch data etc.)? In /src/components or /src/views? All existing components like Dashboard are in /src/views folder.

Also how do I change the logo displayed in mobile version? Modifying <CSidebarBrand /> in /src/components/AppSidebar.js affected only the logo displayed in desktop version. Thanks


Solution

    1. You can create a new folder named container under the src folder where you can create all feature-specific files which perform tasks like fetch data and perform operations on it and render your existing component were you created in /src/views.
    1. In the sidebar logo, if you are asking about sidebar brand logo, then you might be using coreUi class for brand logo which is c-sidebar-brand-full, you can add another logo (Mobile Version) and add class c-sidebar-brand-minimized which shows in Mobile Versions

    Example

    <CSidebarBrand className="d-md-down-none" to="/">
        <span className="c-sidebar-brand-full">
          /*Logo for web version */
        </span>
        <span className="c-sidebar-brand-minimized">
          /*Logo for mobile version */
        </span>
    </CSidebarBrand>