MCPcopy Create free account
hub / github.com/TanStack/db / Navigation

Function Navigation

examples/react/todo/src/components/TodoApp.tsx:239–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237}
238
239function 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}

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected