Skip to content

Commit

Permalink
refactor: remove ref when unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Jan 3, 2024
1 parent ceb2454 commit f7fe8b3
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions components/ExchangesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Exchange = {
url: string
icon: FunctionalComponent
}
const exchanges: Ref<Array<Exchange>> = shallowRef([
const exchanges: Array<Exchange> = [
{
name: 'Gate.io',
url: URLS.bitmart,
Expand All @@ -45,5 +45,5 @@ const exchanges: Ref<Array<Exchange>> = shallowRef([
url: URLS.simpleSwap,
icon: bitmart,
},
])
]
</script>
10 changes: 6 additions & 4 deletions components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<input id="side-menu" ref="checkbox" class="checkbox" type="checkbox" />
<nav class="navbar-tabs">
<ul class="navbar-links animated zoomIn">
<div class="close-menu-container" @click="closeMenu"><CloseNav /></div>
<div class="close-menu-container" @click="closeMenu">
<CloseNavIcon />
</div>
<li class="yellow">
<NuxtLink class="link yellow" to="/build" rel="about">{{
$t('build')
Expand All @@ -28,16 +30,16 @@
</ul>
</nav>
<label ref="menu" for="side-menu" class="hamburguer-container">
<Hamburger class="hamburguer" />
<HamburgerIcon class="hamburguer" />
</label>
</header>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import WitnetLogo from '@/assets/svg/witnet-logo.svg'
import Hamburger from '@/assets/svg/hamburguer.svg'
import CloseNav from '@/assets/svg/close-nav.svg'
import HamburgerIcon from '@/assets/svg/hamburguer.svg'
import CloseNavIcon from '@/assets/svg/close-nav.svg'
const menu = ref()
const checkbox = ref()
const route = useRoute()
Expand Down
4 changes: 2 additions & 2 deletions components/PlatformsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Platform = {
url: string
icon: FunctionalComponent
}
const platforms: Ref<Array<Platform>> = shallowRef([
const platforms: Array<Platform> = [
{
name: 'Docker',
url: URLS.dockerNode,
Expand All @@ -46,5 +46,5 @@ const platforms: Ref<Array<Platform>> = shallowRef([
url: URLS.rasberrypiNode,
icon,
},
])
]
</script>
4 changes: 2 additions & 2 deletions components/TutorialsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { TutorialList } from '@/types'
const { t } = useI18n()
// TODO: add urls
const tutorials: Ref<Array<TutorialList>> = ref([
const tutorials: Array<TutorialList> = [
{
title: t('tutorials.web.title'),
tutorialLinks: [
Expand Down Expand Up @@ -75,5 +75,5 @@ const tutorials: Ref<Array<TutorialList>> = ref([
},
],
},
])
]
</script>
4 changes: 2 additions & 2 deletions components/WalletsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type WalletLink = {
description: string
icon: FunctionalComponent
}
const wallets: Ref<Array<WalletLink>> = shallowRef([
const wallets: Array<WalletLink> = [
{
name: 'Sheikah',
title: t('sheikah.title'),
Expand All @@ -39,5 +39,5 @@ const wallets: Ref<Array<WalletLink>> = shallowRef([
url: URLS.mexc,
icon,
},
])
]
</script>
4 changes: 2 additions & 2 deletions components/sections/BuildSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Reason = {
title: string
description: string
}
const reasons: Ref<Array<Reason>> = ref([
const reasons: Array<Reason> = [
{
title: t('build-section.title-1'),
description: t('build-section.description-1'),
Expand All @@ -41,5 +41,5 @@ const reasons: Ref<Array<Reason>> = ref([
title: t('build-section.title-6'),
description: t('build-section.description-6'),
},
])
]
</script>
4 changes: 2 additions & 2 deletions components/sections/ExploreSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Explorer = {
description: string
url: string
}
const explorers: Ref<Array<Explorer>> = ref([
const explorers: Array<Explorer> = [
{
title: t('explore.explorer-1.title'),
description: t('explore.explorer-1.description'),
Expand All @@ -31,5 +31,5 @@ const explorers: Ref<Array<Explorer>> = ref([
description: t('explore.explorer-2.description'),
url: URLS.blockExplorer,
},
])
]
</script>

0 comments on commit f7fe8b3

Please sign in to comment.