| 237 | } |
| 238 | |
| 239 | function Navigation() { |
| 240 | const style = `px-4 py-2 text-white rounded transition-colors` |
| 241 | const links = [ |
| 242 | [`/query`, `Query`, `bg-green-700 hover:bg-green-800`], |
| 243 | [`/electric`, `Electric`, `bg-blue-500 hover:bg-blue-600`], |
| 244 | [`/trailbase`, `TrailBase`, `bg-purple-600 hover:bg-purple-700`], |
| 245 | ] |
| 246 | |
| 247 | return ( |
| 248 | <nav className="flex justify-center gap-4 mb-4"> |
| 249 | <Link to="/" className={`${style} bg-gray-500 hover:bg-gray-600`}> |
| 250 | ← Home |
| 251 | </Link> |
| 252 | |
| 253 | {links.map(([href, name, cls]) => ( |
| 254 | <Link key={href} to={href} className={`${style} ${cls}`}> |
| 255 | {name} |
| 256 | </Link> |
| 257 | ))} |
| 258 | </nav> |
| 259 | ) |
| 260 | } |