Skip to content

Commit 9f1fb09

Browse files
authored
Merge pull request #2 from Sayan3990/main
Card routing technique changed
2 parents b86a730 + 35d0a1b commit 9f1fb09

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/components/CardUI.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import { Link } from "react-router-dom";
23

34
const CardUI = props => {
45
return (
@@ -11,7 +12,9 @@ const CardUI = props => {
1112
<p className ="card-text text-secondary">
1213
{props.text}
1314
</p>
14-
<a href={'/card/' + props.url} className="btn btn-outline-primary">{props.button}</a>
15+
<Link className="btn btn-outline-primary" to={'/card/' + props.url}>
16+
{props.button}
17+
</Link>
1518
</div>
1619
</div>
1720
)

src/components/Navigation.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ function Navigation() {
1616
<Nav className="mr-auto">
1717
<NavDropdown title={<Button>Features</Button>} id="collasible-nav-dropdown">
1818
{
19-
cardDetails.map(oneCard => <NavDropdown.Item href={'/card/' + oneCard.url}>
20-
{oneCard.title}</NavDropdown.Item> )
19+
cardDetails.map(oneCard => <NavDropdown.Item>
20+
<Link to={'/card/' + oneCard.url} style={{ color: 'black', textDecoration: 'none' }}>
21+
{oneCard.title}
22+
</Link>
23+
</NavDropdown.Item> )
2124
}
2225
</NavDropdown>
2326
<Nav.Link href='#ourfooter'>

0 commit comments

Comments
 (0)