Think it might be ready to deploy. I'm sure there are a lot of bugs, but I at least am no longe finding them

This commit is contained in:
2025-06-16 05:33:57 -05:00
parent bc915275cf
commit a28af1f629
5 changed files with 45 additions and 14 deletions

View File

@ -1,7 +1,7 @@
'use server';
import { createServerClient } from '@/utils/supabase';
import type { Profile, Result } from '@/utils/supabase';
import { getUser, getProfile, getSignedUrl } from '@/lib/actions';
import { getUser, getProfileWithAvatar, getSignedUrl } from '@/lib/actions';
export type UserWithStatus = {
id?: string;
@ -67,9 +67,9 @@ export const getRecentUsersWithStatuses = async (): Promise<
for (const userWithStatus of filtered) {
if (userWithStatus.user.avatar_url)
userWithStatus.user.avatar_url =
await getAvatarUrl(userWithStatus.updated_by?.avatar_url);
await getAvatarUrl(userWithStatus.user.avatar_url);
if (userWithStatus.updated_by?.avatar_url)
userWithStatus.user.avatar_url =
userWithStatus.updated_by.avatar_url =
await getAvatarUrl(userWithStatus.updated_by?.avatar_url);
filteredWithAvatars.push(userWithStatus);
}
@ -115,7 +115,7 @@ export const updateStatuses = async (
): Promise<Result<void>> => {
try {
const supabase = await createServerClient();
const profileResponse = await getProfile();
const profileResponse = await getProfileWithAvatar();
if (!profileResponse.success) throw new Error('Not authenticated!');
const user = profileResponse.data;
@ -155,7 +155,7 @@ export const updateUserStatus = async (
): Promise<Result<void>> => {
try {
const supabase = await createServerClient();
const profileResponse = await getProfile();
const profileResponse = await getProfileWithAvatar();
if (!profileResponse.success)
throw new Error(`Not authenticated! ${profileResponse.error}`);
const userProfile = profileResponse.data;