mirror of
https://github.com/supabase/supabase.git
synced 2026-06-13 19:01:50 +08:00
- Marketplace index page - update order of feature partner integrations in hero - fix z-index on MarketplaceFilterBar in "list" view <img width="275" height="104" alt="Screenshot 2026-06-02 at 17 07 29" src="https://github.com/user-attachments/assets/5cef64f9-895e-4f8d-8f30-153ddd5c89dd" /> - Marketplace detail page - use "prose" css styling on overview content for better text styling (heading with top padding, etc) - refine FilesView in overview tab to only show swipeable and zoomable previews (so the big image doesn't occupy too much space) + lazy load FilesView component - improve page loading state - improve overview side rail sticky-top and remove redundant "About" label <img width="1333" height="732" alt="Screenshot 2026-06-02 at 17 20 29" src="https://github.com/user-attachments/assets/8f3dd4a0-c241-4b7f-b8c8-192e1d7a616d" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Interactive carousel with image zoom capability for viewing integration preview images * **Bug Fixes** * Fixed z-index layering issue with marketplace filter bar * **Refactor** * Redesigned marketplace detail page header with breadcrumb navigation * Updated integration image handling structure with enhanced metadata * Optimized dynamic loading for integration file viewers <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import { useEffect, useState } from 'react'
|
|
import { Markdown } from 'ui-patterns/Markdown'
|
|
|
|
interface MarkdownContentProps {
|
|
content: string | null | undefined
|
|
integrationId?: string
|
|
}
|
|
|
|
export const MarkdownContent = ({
|
|
content: remoteContent,
|
|
integrationId,
|
|
}: MarkdownContentProps) => {
|
|
const [localContent, setLocalContent] = useState<string>('')
|
|
|
|
useEffect(() => {
|
|
// Reset on every id/remote change so navigating between integrations
|
|
// doesn't show the previous one's overview while the new import resolves.
|
|
setLocalContent('')
|
|
|
|
if (!integrationId || remoteContent) return
|
|
|
|
let cancelled = false
|
|
import(`@/static-data/integrations/${integrationId}/overview.md`)
|
|
.then((module) => {
|
|
if (!cancelled) setLocalContent(String(module.default))
|
|
})
|
|
.catch((error) => console.error('Error loading markdown:', error))
|
|
|
|
return () => {
|
|
cancelled = true
|
|
}
|
|
}, [integrationId, remoteContent])
|
|
|
|
const content = remoteContent || localContent
|
|
|
|
return <Markdown className="text-sm">{content}</Markdown>
|
|
}
|