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 * as React from "react";
|
||||||
import { Component } from "react";
|
import { Component } from "react";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
interface InvolveBoxProps {
|
interface InvolveBoxProps {
|
||||||
boxTitle: string;
|
boxTitle: string;
|
||||||
|
@ -14,19 +20,29 @@ export default class InvolveBox extends Component<InvolveBoxProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
return (
|
if (this.props.boxTitle) {
|
||||||
<div className="involve-card">
|
return (
|
||||||
<a
|
<a
|
||||||
className="involve-title"
|
|
||||||
href={"/" + this.props.boxTitle.toLowerCase()}
|
href={"/" + this.props.boxTitle.toLowerCase()}
|
||||||
|
className="involve-card"
|
||||||
>
|
>
|
||||||
{this.props.boxTitle}
|
<div className="involve-title">{this.props.boxTitle}</div>
|
||||||
|
<img src={this.props.image}></img>
|
||||||
|
<div className="involve-description">
|
||||||
|
{this.props.description}
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<img src={this.props.image}></img>
|
);
|
||||||
<div className="involve-description">
|
} else {
|
||||||
{this.props.description}
|
return (
|
||||||
|
<div 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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue