feat: improve image browsing experience
This commit is contained in:
@@ -7,6 +7,7 @@ import type { CloudType, UserCollection } from '@/types/database'
|
||||
export interface CollectionPreviewCloud {
|
||||
id: string
|
||||
image_url: string
|
||||
thumbnail_url: string | null
|
||||
captured_at: string | null
|
||||
created_at: string
|
||||
location_name: string | null
|
||||
@@ -31,6 +32,7 @@ function toCollectionCloudMap(rows: Array<Record<string, unknown>> | null) {
|
||||
{
|
||||
id: row.id as string,
|
||||
image_url: row.image_url as string,
|
||||
thumbnail_url: (row.thumbnail_url as string | null) ?? null,
|
||||
captured_at: (row.captured_at as string | null) ?? null,
|
||||
created_at: row.created_at as string,
|
||||
location_name: (row.location_name as string | null) ?? null,
|
||||
@@ -114,7 +116,7 @@ export const useEncyclopediaStore = defineStore('encyclopedia', () => {
|
||||
if (firstCloudIds.length) {
|
||||
const { data: firstCloudData, error: firstCloudError } = await supabase
|
||||
.from('clouds')
|
||||
.select('id,image_url,captured_at,created_at,location_name')
|
||||
.select('id,image_url,thumbnail_url,captured_at,created_at,location_name')
|
||||
.in('id', firstCloudIds)
|
||||
|
||||
if (firstCloudError) throw firstCloudError
|
||||
|
||||
Reference in New Issue
Block a user