From d548891c032879402b37ece35ab5a927ddb48aa0 Mon Sep 17 00:00:00 2001 From: JilianaTiu Date: Sun, 6 Nov 2022 11:44:25 -0800 Subject: [PATCH] redirect entire involve box --- src/public/components/InvolveBox.tsx | 34 ++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/public/components/InvolveBox.tsx b/src/public/components/InvolveBox.tsx index 6d168b9..514004f 100644 --- a/src/public/components/InvolveBox.tsx +++ b/src/public/components/InvolveBox.tsx @@ -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,19 +20,29 @@ export default class InvolveBox extends Component { } public render() { - return ( -
+ if (this.props.boxTitle) { + return ( - {this.props.boxTitle} +
{this.props.boxTitle}
+ +
+ {this.props.description} +
- -
- {this.props.description} + ); + } else { + return ( +
+
{this.props.boxTitle}
+ +
+ {this.props.description} +
-
- ); + ); + } } }