redirect entire involve box
This commit is contained in:
parent
969d043677
commit
d548891c03
1 changed files with 25 additions and 9 deletions
|
@ -1,5 +1,11 @@
|
|||
import {
|
||||
NavigationHelpersContext,
|
||||
useNavigation,
|
||||
useNavigationState,
|
||||
} from "@react-navigation/native";
|
||||
import * as React from "react";
|
||||
import { Component } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
interface InvolveBoxProps {
|
||||
boxTitle: string;
|
||||
|
@ -14,14 +20,23 @@ export default class InvolveBox extends Component<InvolveBoxProps> {
|
|||
}
|
||||
|
||||
public render() {
|
||||
if (this.props.boxTitle) {
|
||||
return (
|
||||
<a
|
||||
href={"/" + this.props.boxTitle.toLowerCase()}
|
||||
className="involve-card"
|
||||
>
|
||||
<div className="involve-title">{this.props.boxTitle}</div>
|
||||
<img src={this.props.image}></img>
|
||||
<div className="involve-description">
|
||||
{this.props.description}
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div className="involve-card">
|
||||
<a
|
||||
className="involve-title"
|
||||
href={"/" + this.props.boxTitle.toLowerCase()}
|
||||
>
|
||||
{this.props.boxTitle}
|
||||
</a>
|
||||
<div className="involve-title">{this.props.boxTitle}</div>
|
||||
<img src={this.props.image}></img>
|
||||
<div className="involve-description">
|
||||
{this.props.description}
|
||||
|
@ -29,4 +44,5 @@ export default class InvolveBox extends Component<InvolveBoxProps> {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue