mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 13:05:24 +02:00
Fix syntax error: undefined variable in ForecastView
This commit is contained in:
@@ -35,7 +35,7 @@ const Top50Badge: React.FC<{ rank: number; label: string; theme?: 'amber' | 'ind
|
|||||||
};
|
};
|
||||||
|
|
||||||
const ForecastRow: React.FC<{
|
const ForecastRow: React.FC<{
|
||||||
item: ForecastViewData;
|
item: ProductForecastData;
|
||||||
activeMonths: string[];
|
activeMonths: string[];
|
||||||
top50Ranking?: { eu: Map<string, number>; uk: Map<string, number> };
|
top50Ranking?: { eu: Map<string, number>; uk: Map<string, number> };
|
||||||
stockMap?: Map<string, number>;
|
stockMap?: Map<string, number>;
|
||||||
@@ -471,9 +471,9 @@ const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="divide-y divide-slate-800">
|
<tbody className="divide-y divide-slate-800">
|
||||||
{sortedAndFiltered.length > 0 ? (
|
{sortedProducts.length > 0 ? (
|
||||||
(() => {
|
(() => {
|
||||||
const displayItems = sortedAndFiltered.slice(0, displayCount);
|
const displayItems = sortedProducts.slice(0, displayCount);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{displayItems.map(p => (
|
{displayItems.map(p => (
|
||||||
@@ -485,14 +485,14 @@ const ForecastView: React.FC<ForecastViewProps> = ({ data, filters, top50Ranking
|
|||||||
stockMap={stockMap}
|
stockMap={stockMap}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{displayCount < sortedAndFiltered.length && (
|
{displayCount < sortedProducts.length && (
|
||||||
<tr>
|
<tr>
|
||||||
<td colSpan={5} className="px-6 py-6 text-center bg-slate-900/40 backdrop-blur-sm border-t border-white/5">
|
<td colSpan={5} className="px-6 py-6 text-center bg-slate-900/40 backdrop-blur-sm border-t border-white/5">
|
||||||
<button
|
<button
|
||||||
onClick={() => setDisplayCount(prev => prev + 100)}
|
onClick={() => setDisplayCount(prev => prev + 100)}
|
||||||
className="px-6 py-2.5 bg-indigo-600 hover:bg-indigo-500 text-white rounded-xl text-xs font-black uppercase tracking-widest shadow-xl transition-all active:scale-95 border border-indigo-400/30"
|
className="px-6 py-2.5 bg-indigo-600 hover:bg-indigo-500 text-white rounded-xl text-xs font-black uppercase tracking-widest shadow-xl transition-all active:scale-95 border border-indigo-400/30"
|
||||||
>
|
>
|
||||||
Load More SKUs ({sortedAndFiltered.length - displayCount} remaining)
|
Load More SKUs ({sortedProducts.length - displayCount} remaining)
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user