@@ -4,7 +4,7 @@ import { notFound } from "next/navigation";
44import type { Theme } from "@/types/theme" ;
55import ThemePreviewPanel from "./editor/theme-preview-panel" ;
66import { Button } from "@/components/ui/button" ;
7- import { Share , Sun , Moon , MoreVertical , Edit , Copy } from "lucide-react" ;
7+ import { Share , Sun , Moon , MoreVertical , Edit } from "lucide-react" ;
88import {
99 DropdownMenu ,
1010 DropdownMenuContent ,
@@ -17,6 +17,7 @@ import { useEffect } from "react";
1717import { Header } from "./editor/header" ;
1818import { Footer } from "@/components/home/footer" ;
1919import { toast } from "@/components/ui/use-toast" ;
20+
2021export default function ThemeView ( { theme } : { theme : Theme } ) {
2122 const {
2223 themeState,
@@ -36,13 +37,8 @@ export default function ThemeView({ theme }: { theme: Theme }) {
3637 return ( ) => {
3738 restoreThemeCheckpoint ( ) ;
3839 } ;
39- } , [
40- theme ,
41- saveThemeCheckpoint ,
42- setThemeState ,
43- themeState ,
44- restoreThemeCheckpoint ,
45- ] ) ;
40+ // eslint-disable-next-line react-hooks/exhaustive-deps
41+ } , [ theme , saveThemeCheckpoint , setThemeState , restoreThemeCheckpoint ] ) ;
4642
4743 if ( ! theme ) {
4844 notFound ( ) ;
@@ -87,7 +83,7 @@ export default function ThemeView({ theme }: { theme: Theme }) {
8783 < Moon className = "size-4" />
8884 ) }
8985 </ Button >
90- < Button variant = "outline" size = "default" >
86+ < Button variant = "outline" size = "default" onClick = { handleShare } >
9187 < Share className = "size-4" />
9288 Share
9389 </ Button >
@@ -105,10 +101,6 @@ export default function ThemeView({ theme }: { theme: Theme }) {
105101 < Edit className = "size-4" />
106102 Open in Editor
107103 </ DropdownMenuItem >
108- < DropdownMenuItem onClick = { handleShare } className = "gap-2" >
109- < Copy className = "size-4" />
110- Copy URL
111- </ DropdownMenuItem >
112104 </ DropdownMenuContent >
113105 </ DropdownMenu >
114106 </ div >
0 commit comments