redirect entire involve box

This commit is contained in:
JilianaTiu 2022-11-06 11:44:25 -08:00
parent 969d043677
commit d548891c03

View file

@ -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,14 +20,23 @@ export default class InvolveBox extends Component<InvolveBoxProps> {
} }
public render() { 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 ( return (
<div className="involve-card"> <div className="involve-card">
<a <div className="involve-title">{this.props.boxTitle}</div>
className="involve-title"
href={"/" + this.props.boxTitle.toLowerCase()}
>
{this.props.boxTitle}
</a>
<img src={this.props.image}></img> <img src={this.props.image}></img>
<div className="involve-description"> <div className="involve-description">
{this.props.description} {this.props.description}
@ -29,4 +44,5 @@ export default class InvolveBox extends Component<InvolveBoxProps> {
</div> </div>
); );
} }
}
} }