mirror of
https://github.com/hanzoai/store.git
synced 2026-11-03 03:43:19 +00:00
High Priority Fixes: - ✅ Add View Details button for app navigation to detail pages - ✅ Add footer links for Guidelines, Terms, and Privacy pages - ✅ Rename data files to match store.json IDs (hanzo→shinkai prefix) - ✅ Fix WalletConnect projectId - make optional to avoid console errors - ✅ Add favicon using Hanzo logo Medium Priority Fixes: - ✅ Remove console statements from production code - ✅ Remove unused Github import from page-client - ✅ Add URL sanitization for security (XSS prevention) - ✅ Create URL validation utility function Code Quality Improvements: - ✅ Add TypeScript type definitions for @hanzo/ui - ✅ Add explicit types for event handlers - ✅ Add .env.example for WalletConnect setup - ✅ Add LLM.md with comprehensive documentation - ✅ Fix implicit any types in test files Security Enhancements: - Sanitize all external URLs before rendering - Validate URL protocols (http/https only) - Prevent XSS through URL injection Files Changed: - app/page.tsx - navigation, footer links, URL validation - app/apps/[id]/page-client.tsx - URL validation, remove console - app/apps/[id]/page.tsx - remove console - lib/wagmi.ts - make WalletConnect optional - lib/url-utils.ts - NEW: URL validation utility - types/hanzo-ui.d.ts - NEW: TypeScript declarations - .env.example - NEW: environment variable template - .github/workflows/deploy.yml - add WalletConnect env var - public/favicon.ico - NEW: Hanzo logo favicon - data files - rename to match IDs
26 lines
807 B
TypeScript
26 lines
807 B
TypeScript
import { AppDetailPageClient } from './page-client'
|
|
import type { StoreApp } from '@/types'
|
|
|
|
// Generate static params for all apps at build time
|
|
export async function generateStaticParams() {
|
|
try {
|
|
// Read store.json from public directory at build time
|
|
const fs = await import('fs')
|
|
const path = await import('path')
|
|
const storeDataPath = path.join(process.cwd(), 'public', 'store.json')
|
|
const storeDataContent = fs.readFileSync(storeDataPath, 'utf-8')
|
|
const storeData = JSON.parse(storeDataContent)
|
|
|
|
return storeData.apps.map((app: StoreApp) => ({
|
|
id: app.id,
|
|
}))
|
|
} catch {
|
|
return []
|
|
}
|
|
}
|
|
|
|
export default async function AppDetailPage({ params }: { params: Promise<{ id: string }> }) {
|
|
const { id } = await params
|
|
return <AppDetailPageClient id={id} />
|
|
}
|