Skip to content

Commit 26f909e

Browse files
Update SmallPortraitCard and SmallPortraitCardWithDialog to fix the fact that the individual popup were not rendered on /about/person page when entering the corresponding url.
1 parent 8cd897f commit 26f909e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/components/about/SmallPortraitCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import Avatar from "./Avatar";
44

55
export function SmallPortraitCard({ person }) {
66
const history = useHistory();
7-
history.push("/about/");
87

98
function openDialog () {
9+
history.push("/about/");
1010
history.push("/about/" + person.firstName);
11+
1112
};
1213

1314
return (

src/components/about/SmallPortraitCardWithDialog.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@ import styles from "./styles.module.css";
22
import React from "react";
33
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
44
import { useHistory } from "@docusaurus/router";
5-
import { useState } from "react";
65

76
import LargePortraitCard from "./LargePortraitCard";
87
import { SmallPortraitCard } from "./SmallPortraitCard";
98

109
export function SmallPortraitCardWithDialog({ person }) {
1110
const history = useHistory();
1211

13-
1412
function closeDialog() {
15-
history.goBack();
13+
history.goBack()
1614
}
1715

1816
return (
@@ -45,4 +43,4 @@ export function SmallPortraitCardWithDialog({ person }) {
4543
</div>
4644
</Router>
4745
);
48-
}
46+
}

0 commit comments

Comments
 (0)