ilovecherries/glimmer

Refactor sidebar buttons code

ilovecherries opened this issue ยท 0 comments

<div
          :class="`sidebar-button-container ${
            sidebarView === 0 ? 'bg-accent-2' : 'bg-accent'
          }`"
          @click="sidebarView = 0"
        >
          <div class="text-l">๐Ÿ </div>
        </div>
        <div
          :class="`sidebar-button-container ${
            sidebarView === 1 ? 'bg-accent-2' : 'bg-accent'
          }`"
          @click="sidebarView = 1"
        >
          <div class="text-l">๐Ÿ”Ž</div>
        </div>

this is pretty embarassing in itself and should be pretty self evident why they need to be turned into components. this wouldn't be that hard probablyy. can you have references update between multiple components? things to think about