@@ -10,6 +10,11 @@ definePageMeta({
1010
1111const user = inject <ComputedRef <User >>(' user-data' );
1212const isBlockedBy = computed (() => user ?.value .relationship .blockedBy || false );
13+ const userStore = useUserStore ();
14+
15+ const isCurrentUser = computed (() => {
16+ return userStore .user ?.username === user ?.value .username ;
17+ });
1318
1419const {
1520 data : response,
@@ -71,21 +76,30 @@ onServerPrefetch(async () => {
7176 </div >
7277 </template >
7378 </VirtualInfiniteScroller >
74- </ClientOnly >
75- </div >
7679
77- <div
78- v-if =" (hasNextPage && isFetchingNextPage) || isLoading"
79- class =" text-primary flex shrink-0 items-center justify-center py-4"
80- >
81- <UiSpinner />
80+ <div
81+ v-if =" (hasNextPage && isFetchingNextPage) || isLoading"
82+ class =" text-primary flex shrink-0 items-center justify-center py-4"
83+ >
84+ <UiSpinner />
85+ </div >
86+ </ClientOnly >
8287 </div >
83- <div
84- v-if =" tweets.length === 0 && !isFetchingNextPage && !isLoading"
85- data-testid =" empty-state"
86- class =" text-muted-foreground mt-10 text-center"
87- >
88- <h1 class =" text-xl font-semibold" >{{ $t('testing.tweets.tweet-not-found') }}</h1 >
88+ <div v-if =" !isLoading && tweets.length === 0" class =" mx-auto my-10 max-w-90 px-8 text-start" >
89+ <h2 class =" text-[2rem] leading-tight font-black" >
90+ {{
91+ isCurrentUser
92+ ? $t('profile.media.current-user-no-media.title')
93+ : $t('profile.media.no-media.title', { username: user?.username || '' })
94+ }}
95+ </h2 >
96+ <p class =" text-muted-foreground leading-tight" >
97+ {{
98+ isCurrentUser
99+ ? $t('profile.media.current-user-no-media.description')
100+ : $t('profile.media.no-media.description')
101+ }}
102+ </p >
89103 </div >
90104 </div >
91105</template >
0 commit comments