Skip to content

Commit 77211ec

Browse files
committed
Feature/public themes (#55)
* fix: Theme preset hover + middleware dead code * wip * refactor apply-theme-to-element * feat: Add theme view * Show unsaved changes in theme-preset-select * feat: Add more actions for themes * fix build errors
1 parent 6bd7229 commit 77211ec

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

app/themes/[themeId]/not-found.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export default function ThemeNotFound() {
77
<div className="text-center">
88
<h1 className="text-4xl font-bold mb-4">Theme Not Found</h1>
99
<p className="text-muted-foreground mb-8">
10-
The theme you're looking for doesn't exist or you don't have
10+
The theme you're looking for doesn\'t exist or you don\'t have
1111
permission to view it.
1212
</p>
1313
<Button asChild>
14-
<Link href="/dashboard">Return to Dashboard</Link>
14+
<Link href="/editor/theme">Return to Editor</Link>
1515
</Button>
1616
</div>
1717
</main>

components/editor/theme-preset-select.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ const ThemePresetSelect: React.FC<ThemePresetSelectProps> = ({
267267
currentPreset,
268268
themeState.styles,
269269
presets,
270-
value,
271270
]);
272271

273272
return (

components/editor/theme-preview-panel.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
TooltipContent,
1818
TooltipTrigger,
1919
} from "@/components/ui/tooltip";
20-
import { ActionBar } from "./action-bar/action-bar";
2120

2221
const DemoCards = lazy(() => import("@/components/examples/demo-cards"));
2322
const DemoMail = lazy(() => import("@/components/examples/mail"));

components/theme-view.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ export default function ThemeView({ theme }: { theme: Theme }) {
3636
return () => {
3737
restoreThemeCheckpoint();
3838
};
39-
}, [theme]);
39+
}, [
40+
theme,
41+
saveThemeCheckpoint,
42+
setThemeState,
43+
themeState,
44+
restoreThemeCheckpoint,
45+
]);
4046

4147
if (!theme) {
4248
notFound();

0 commit comments

Comments
 (0)