# רכיב ערכת נושא מותאם אישית לא מוצג ברינדור ראשון

**URL:** <https://meta.discourse.org/t/custom-theme-component-doesnt-show-on-first-render/232162>\
**Category:** Product Support\
**Created:** [7 ביולי,‏ 2022,‏ 12:55am UTC](https://meta.discourse.org/t/custom-theme-component-doesnt-show-on-first-render/232162 "2022-07-07T00:55:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)\
**Post date:** [7 ביולי,‏ 2022,‏ 12:55am UTC](https://meta.discourse.org/t/custom-theme-component-doesnt-show-on-first-render/232162/1 "2022-07-07T00:55:57Z")

</div>

I created a simple component that will display a simple clickable banner for the login users. It works fine until I upgrade to [2.9.0.beta5: Security Fixes, Block Hotlinked Media, PM Tagging, Search Improvements, and more](https://meta.discourse.org/t/2-9-0-beta5-security-fixes-block-hotlinked-media-pm-tagging-search-improvements-and-more/229845)

The component only shows up when I refresh the page 2~3 times and it will disappear every time when I open my site in a new tab/window. I see the same issue happens on theme-creator.

Any idea why this happens? Following is the code I use.

```plaintext
<script type="text/discourse-plugin" version="0.8">
const h = require("virtual-dom").h;

let user = api.getCurrentUser();

if(user){
 api.createWidget("fixed-banner", {
     tagName: "div.container-row",

     html() {
         return h('div.content', [
             h('a.bannerLink', {
                href: '/categories',
             }, 'test'),
    ]);
     }
 });
  
}
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/custom-theme-component-doesnt-show-on-first-render/232162)._
