use Link instead of a for share link
This commit is contained in:
parent
0157ea3122
commit
5dd57c0f2a
|
@ -1,6 +1,7 @@
|
|||
import { GameState } from './GamesUtil';
|
||||
import twemoji from 'twemoji';
|
||||
import React, { useRef, useLayoutEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import './Game.css';
|
||||
import base_filled from './img/base_filled.png';
|
||||
import base_empty from './img/base_empty.png';
|
||||
|
@ -56,7 +57,7 @@ function Game(props: {gameId: string, state : GameState}) {
|
|||
</div>
|
||||
<div className="footer">
|
||||
<div className="batting">{state.display_top_of_inning ? state.away_name : state.home_name} batting.</div>
|
||||
<div className="leagueoruser">{state.leagueoruser} (<a href={"/game?id=" + props.gameId}>share</a>)</div>
|
||||
<div className="leagueoruser">{state.leagueoruser} (<Link to={"/game?id=" + props.gameId}>share</Link>)</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -22,7 +22,7 @@ function GamesPage() {
|
|||
|
||||
let gameList = useRef(new Array<(string | null)>());
|
||||
let filterGames = games.filter((game, i) => filter === "" || game[1].leagueoruser === filter);
|
||||
updateList(gameList.current, filterGames, searchparams.get('gameId'));
|
||||
updateList(gameList.current, filterGames, searchparams.get('game'));
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Reference in New Issue
Block a user