Add playlist export and SEO meta tags
Add text/CSV export endpoints for playlists and saved recommendations. Add export buttons to PlaylistDetail and Recommendations pages. Add Open Graph and Twitter meta tags to index.html for better SEO.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Loader2, Clock, Heart, Sparkles } from 'lucide-react'
|
||||
import { Loader2, Clock, Heart, Sparkles, Download } from 'lucide-react'
|
||||
import { useAuth } from '../lib/auth'
|
||||
import { getRecommendationHistory, getSavedRecommendations, toggleSaveRecommendation, type RecommendationItem } from '../lib/api'
|
||||
import { getRecommendationHistory, getSavedRecommendations, toggleSaveRecommendation, exportSaved, type RecommendationItem } from '../lib/api'
|
||||
import RecommendationCard from '../components/RecommendationCard'
|
||||
|
||||
type Tab = 'saved' | 'history'
|
||||
@@ -92,7 +92,18 @@ export default function Recommendations() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Tabs */}
|
||||
{/* Export + Tabs */}
|
||||
<div className="flex items-center gap-4">
|
||||
{tab === 'saved' && saved.length > 0 && (
|
||||
<button
|
||||
onClick={() => exportSaved()}
|
||||
className="flex items-center gap-2 px-4 py-2.5 bg-purple-50 text-purple text-sm font-medium rounded-xl hover:bg-purple-100 transition-colors cursor-pointer border-none"
|
||||
>
|
||||
<Download className="w-4 h-4" />
|
||||
Export Saved
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex gap-1 bg-purple-50 p-1 rounded-xl w-fit">
|
||||
<button
|
||||
onClick={() => setTab('saved')}
|
||||
|
||||
Reference in New Issue
Block a user