mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
feat(api): implement precomputed widget data storage and retrieval.
This commit is contained in:
@@ -85,6 +85,8 @@ type Props = {
|
||||
onGenerate: () => void
|
||||
onBack: () => void
|
||||
fetchDone: boolean
|
||||
fetchError: string | null
|
||||
isDemo: boolean
|
||||
widgetData: WidgetData | null
|
||||
}
|
||||
|
||||
@@ -95,6 +97,8 @@ export function WorkshopScreen({
|
||||
onGenerate,
|
||||
onBack,
|
||||
fetchDone,
|
||||
fetchError,
|
||||
isDemo,
|
||||
widgetData,
|
||||
}: Props) {
|
||||
const [expandedWidget, setExpandedWidget] = useState<string | null>(null)
|
||||
@@ -175,7 +179,17 @@ export function WorkshopScreen({
|
||||
|
||||
<div className="text-sm font-semibold text-gray-800 mb-1">{username}</div>
|
||||
<div className="flex items-center gap-1.5 text-[10px] text-gray-400 mb-6">
|
||||
{fetchDone ? (
|
||||
{fetchError ? (
|
||||
<>
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-red-400" />
|
||||
{fetchError}
|
||||
</>
|
||||
) : isDemo ? (
|
||||
<>
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse" />
|
||||
Building your widget — showing demo
|
||||
</>
|
||||
) : fetchDone ? (
|
||||
<>
|
||||
<div className="w-1.5 h-1.5 rounded-full bg-emerald-400" />
|
||||
Data ready
|
||||
|
||||
Reference in New Issue
Block a user