Skip to content

Commit

Permalink
refactor: Update Final component to use Link instead of anchor tag fo…
Browse files Browse the repository at this point in the history
…r button navigation
  • Loading branch information
drikusroor committed May 6, 2024
1 parent 5d72fde commit 56a0005
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/Final/Final.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from "react";
import { withRouter } from "react-router-dom";
import { Link, withRouter } from "react-router-dom";

import Rank from "../Rank/Rank";
import Social from "../Social/Social";
Expand Down Expand Up @@ -65,9 +65,9 @@ const Final = ({ experiment, participant, score, final_text, action_texts, butto
</div>
{button && (
<div className="text-center pt-4">
<a className='btn btn-primary btn-lg' href={button.link} onClick={button.link ? undefined : onNext}>
<Link className='btn btn-primary btn-lg' to={button.link} onClick={button.link ? undefined : onNext}>
{button.text}
</a>
</Link>
</div>
)}
{logo && (
Expand Down

0 comments on commit 56a0005

Please sign in to comment.