Skip to content

Commit 5936e7d

Browse files
committed
vie theme with safe url
1 parent 87227b1 commit 5936e7d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/components/profile/Themecard.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
import { Link } from "react-router-dom"
12
import { GenericItemCardProps } from "../../interfaces/profile"
23

3-
export const ThemeCard: React.FC<GenericItemCardProps> = ({ themeImg, name, description }) => {
4+
export const ThemeCard: React.FC<GenericItemCardProps> = ({ themeImg, id, name, description }) => {
45
return (
56
<div className="flex gap-3 w-full h-fit flex-row">
67
<img className="w-20 rounded-lg" src={themeImg} />
78
<div className="flex flex-col w-full relative gap-3">
89
<h1 className="font-extrabold text-xl">{name}</h1>
910
<p className="text-primary-mutedForeground text-sm block ">{description}</p>
10-
{/* <div className="flex absolute bottom-0 bg-primary-darkForeground flex-row gap-2">
11-
<a className=" cursor-pointer text-sm text-blue-500 ">View Theme</a>
12-
{mode == 1 && <a className="cursor-pointer text-sm text-red-500">Remove favourite</a>}
13-
</div> */}
11+
<div className="flex absolute bottom-0 bg-primary-darkForeground flex-row gap-2">
12+
<Link className=" cursor-pointer font-extrabold text-sm text-blue-500" to={"/themes?theme="+encodeURIComponent(id)} >View Theme</Link>
13+
{/* {mode == 1 && <a className="cursor-pointer text-sm text-red-500">Remove favourite</a>} */}
14+
</div>
1415
</div>
1516
</div>
1617
)

0 commit comments

Comments
 (0)