mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 10:27:49 +00:00
fix: correct glass theme and haptic API usage in Subscriptions page
This commit is contained in:
@@ -42,19 +42,20 @@ function SubscriptionCard({
|
|||||||
subscription: SubscriptionListItem;
|
subscription: SubscriptionListItem;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
}) {
|
}) {
|
||||||
const { theme } = useTheme();
|
const { isDark } = useTheme();
|
||||||
const glass = getGlassColors(theme);
|
const g = getGlassColors(isDark);
|
||||||
const haptic = useHaptic();
|
const { impact } = useHaptic();
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
haptic?.();
|
impact('light');
|
||||||
onClick();
|
onClick();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
className={`w-full rounded-2xl p-4 text-left transition-all duration-200 hover:scale-[1.01] active:scale-[0.99] ${glass.card} ${glass.border} border`}
|
className="bento-card w-full text-left transition-all duration-200 hover:scale-[1.01] active:scale-[0.99]"
|
||||||
|
style={{ background: g.cardBg, borderColor: g.cardBorder }}
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
@@ -101,11 +102,8 @@ function SubscriptionCard({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function EmptyState({ onBuy }: { onBuy: () => void }) {
|
function EmptyState({ onBuy }: { onBuy: () => void }) {
|
||||||
const { theme } = useTheme();
|
|
||||||
const glass = getGlassColors(theme);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`rounded-2xl p-6 text-center ${glass.card} ${glass.border} border`}>
|
<div className="bento-card p-6 text-center">
|
||||||
<div className="mb-3 text-4xl">📋</div>
|
<div className="mb-3 text-4xl">📋</div>
|
||||||
<h3 className="mb-1 text-lg font-semibold">Нет подписок</h3>
|
<h3 className="mb-1 text-lg font-semibold">Нет подписок</h3>
|
||||||
<p className="mb-4 text-sm opacity-60">У вас пока нет активных подписок</p>
|
<p className="mb-4 text-sm opacity-60">У вас пока нет активных подписок</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user