Skip to content

Commit 697e247

Browse files
committed
Fix: colour slider performance
1 parent 2dab85e commit 697e247

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

apps/snow-leopard/components/publish-settings-menu.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ function hexToHSL(H: string) {
5858
}
5959

6060
export function PublishSettingsMenu({ document, user, onUpdate }: PublishSettingsMenuProps) {
61-
// Subscription gating for publish settings
6261
const { data: subscriptionData, isLoading: isSubscriptionLoading } = useSWR<{ hasActiveSubscription: boolean }>('/api/user/subscription-status', fetcher, { revalidateOnFocus: false });
6362
const hasSubscription = subscriptionData?.hasActiveSubscription ?? false;
6463
const [isPaywallOpen, setPaywallOpen] = useState(false);
@@ -222,16 +221,13 @@ export function PublishSettingsMenu({ document, user, onUpdate }: PublishSetting
222221
if (mode === 'default' || !mode) {
223222
setTextColor(undefined);
224223
} else if (mode === 'custom') {
225-
// If switching to custom and no color was previously selected, set a default
226224
if (textColor === undefined) {
227225
setTextColor('#0f172a');
228226
}
229227
}
230228
};
231229

232-
// While loading subscription status, don't render anything
233230
if (isSubscriptionLoading) return null;
234-
// Render publish settings menu for subscribed users
235231
return (
236232
<DropdownMenu onOpenChange={(open) => { if (open) { loadUsername(); } }}>
237233
<DropdownMenuTrigger asChild>

apps/snow-leopard/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@radix-ui/react-slot": "^1.1.0",
13-
"@radix-ui/react-popover": "^1.1.14",
1412
"@snow-leopard/db": "workspace:*",
1513
"@vercel/og": "^0.6.8",
1614
"autoprefixer": "^10.4.18",
@@ -26,6 +24,8 @@
2624
"@ai-sdk/anthropic": "^1.2.12",
2725
"@ai-sdk/react": "^1.1.20",
2826
"@better-auth/stripe": "^1.2.7",
27+
"@radix-ui/react-slot": "^1.1.0",
28+
"@radix-ui/react-popover": "^1.1.14",
2929
"@radix-ui/react-alert-dialog": "^1.1.2",
3030
"@radix-ui/react-checkbox": "^1.1.4",
3131
"@radix-ui/react-dialog": "^1.1.2",

0 commit comments

Comments
 (0)