Skip to content

Commit

Permalink
added dynamic links to cards
Browse files Browse the repository at this point in the history
  • Loading branch information
moovendhan-v committed Mar 18, 2024
1 parent b02a120 commit 49700c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ui/src/components/ComponentsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { addComponents } from '../actions/components.actions';
import { SvgIcons } from "./Button";
import OutputsOfComponents from './OutputsOfComponents';
import SeachBar from './Search';
import { Link } from 'react-router-dom';

const ComponentsCard = ({ catogreise, componentType, onlyCard = false }) => {

Expand Down Expand Up @@ -74,7 +75,9 @@ const ComponentsCard = ({ catogreise, componentType, onlyCard = false }) => {
<div>
<SvgIcons icon={"code"} />
</div>
<div> Edit code</div>
<Link to={`/${component.post_details.catogries}/${component.post_details.folder_name}`}>
<div> Edit code</div>
</Link>
</div>
<div className="box m-1 p-1">
<OutputsOfComponents
Expand Down Expand Up @@ -118,7 +121,9 @@ const ComponentsCard = ({ catogreise, componentType, onlyCard = false }) => {
<div>
<SvgIcons icon={"code"} />
</div>
<div> Edit code</div>
<Link to={`/${component.post_details.catogries}/${component.post_details.folder_name}`}>
<div> Edit code</div>
</Link>
</div>
<div className="box m-1 p-1">
<OutputsOfComponents
Expand Down Expand Up @@ -155,7 +160,9 @@ const ComponentsCard = ({ catogreise, componentType, onlyCard = false }) => {
<div>
<SvgIcons icon={"code"} />
</div>
<div> Edit code</div>
<Link to={`/${component.post_details.catogries}/${component.post_details.folder_name}`}>
<div> Edit code</div>
</Link>
</div>
<div className="box m-1 p-1">
<OutputsOfComponents
Expand Down
3 changes: 3 additions & 0 deletions ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ body {
cursor: pointer;
z-index: 999;
}
.readCode a{
text-decoration: none;
}
.myBoxContainer:hover .readCode{
opacity: 100%;
cursor: pointer;
Expand Down

0 comments on commit 49700c3

Please sign in to comment.