Skip to main content

Quick Start

withWorkspace Helper

Props Reference

Children Function

Common Patterns

Dashboard Page

Settings Page

Dataset Page (with additional params)

Client Component Integration

Error Handling

The wrapper automatically handles:
  • Invalid workspace ID → notFound()
  • User not authenticated → Redirects to login
  • Workspace not found → notFound()
  • User not a member → notFound()

Migration Checklist

  • Replace manual getWorkspace() calls
  • Pass the route params Promise (not searchParams) into WorkspaceWrapper
  • Use validated wsId from wrapper
  • Add appropriate loading fallbacks
  • Update TypeScript types
  • Test error scenarios

Troubleshooting