prod-react-routing #48

Merged
djmil merged 6 commits from prod-routing into main 2023-12-02 02:12:42 +01:00
Showing only changes of commit 50a8d7d0f8 - Show all commits

View File

@ -1,6 +1,6 @@
import React, { useContext, useEffect } from 'react';
import { GamesStateContext, GamesGuideContext } from '../context/games';
import { NavLink, Routes, Route } from 'react-router-dom';
import { Routes, Route, Link } from 'react-router-dom';
import NewGame from './games/NewGame';
import { GameProposalSelector, ActiveGameSelector, GameArchiveSelector } from './games/GameSelector';
@ -46,12 +46,14 @@ function ViewSelector() {
const guide = useContext(GamesGuideContext);
return (
<nav className='ViewSelector' >
<div className='Container' >
<NavLink to='/games/new'>New</NavLink>
<NavLink to='/games/proposal'>Proposal<Counter number={guide.awaiting.proposal} /></NavLink>
<NavLink to='/games/active' >Active<Counter number={guide.awaiting.active} /></NavLink>
<NavLink to='/games/archive' >Archive</NavLink>
<nav>
<div className='ViewSelector'>
<div className='Container' >
<Link to='new'>New</Link>
<Link to='proposal'>Proposal<Counter number={guide.awaiting.proposal} /></Link>
<Link to='active' >Active<Counter number={guide.awaiting.active} /></Link>
<Link to='archive' >Archive</Link>
</div>
</div>
</nav>
)