[site/components][f]: tooltip props fix

This commit is contained in:
olayway 2022-05-18 16:32:50 +02:00
parent 1a13aed153
commit 9033ca0214
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ const tooltipArrowStyle = ({ theme, x, y, side }) => ({
transform: "rotate(45deg)"
})
export const Tooltip = (props) => {
export const Tooltip = ({ absolutePath, render, ...props }) => {
const theme = 'light'; // temporarily hard-coded; light theme tbd in next PR
const arrowRef = useRef(null);
@ -104,7 +104,7 @@ export const Tooltip = (props) => {
const fetchTooltipContent = async () => {
setTooltipContentLoaded(false);
const response = await fetch(props.absolutePath);
const response = await fetch(absolutePath);
if (response.status !== 200) {
console.log(`Looks like there was a problem. Status Code: ${response.status}`)
return
@ -124,7 +124,7 @@ export const Tooltip = (props) => {
return (
<Fragment>
{ props.render(tooltipTriggerProps) }
{ render(tooltipTriggerProps) }
<FloatingPortal>
<AnimatePresence>
{ showTooltip && tooltipContentLoaded &&