Skip to content

Commit aea7612

Browse files
committed
refactor: move grid display into /library
1 parent 14db1ae commit aea7612

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

apps/app-frontend/src/components/GridDisplay.vue renamed to apps/app-frontend/src/components/ui/library/GridDisplay.vue

File renamed without changes.

‎apps/app-frontend/src/components/ui/library/index.vue‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Labrinth } from '@modrinth/api-client'
33
import { NavTabs } from '@modrinth/ui'
44
import { computed, ref, watchEffect } from 'vue'
55
6-
import GridDisplay from '@/components/GridDisplay.vue'
6+
import GridDisplay from '@/components/ui/library/GridDisplay.vue'
77
import { get_project_v3_many } from '@/helpers/cache.js'
88
import type { GameInstance } from '@/helpers/types'
99
@@ -70,12 +70,6 @@ const filteredInstances = computed(() => {
7070
<template>
7171
<section class="flex flex-col gap-3">
7272
<h2 class="m-0 text-lg font-bold text-primary">Library</h2>
73-
<NavTabs
74-
mode="local"
75-
:links="tabs"
76-
:active-index="activeTab"
77-
@tab-click="(index) => (activeTab = index)"
78-
/>
7973
<GridDisplay label="Instances" :instances="filteredInstances" />
8074
</section>
8175
</template>

‎apps/app-frontend/src/pages/Index.vue‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ onUnmounted(() => {
5151
<template>
5252
<WelcomeScreen v-if="isReady && !hasCreatedInstance" />
5353
<div v-else-if="isReady" class="flex flex-col gap-6 p-6">
54-
<h1 v-if="recentInstances?.length > 0" class="m-0 text-2xl font-extrabold">Welcome back!</h1>
55-
<h1 v-else class="m-0 text-2xl font-extrabold">Welcome to Modrinth App!</h1>
56-
<RecentWorldsList :recent-instances="recentInstances" />
54+
<RecentWorldsList v-if="recentInstances?.length > 0" :recent-instances="recentInstances" />
5755
<LibrarySection :instances="instances" />
5856
</div>
5957
</template>

0 commit comments

Comments
 (0)