Hiyve Components - v1.0.0
    Preparing search index...

    Function JoinWithTokenForm

    • Form component for joining a room via an invite link.

      Parameters

      Returns Element

      This component provides a complete join flow including:

      • Token validation on mount (optional)
      • Name input with localStorage persistence
      • Password input (shown when required)
      • Error handling with user-friendly messages
      • Loading states for validation and joining

      Must be used within a HiyveProvider context.

      Basic usage:

      function JoinPage() {
      const params = new URLSearchParams(window.location.search);
      const token = params.get('joinToken');
      const region = params.get('region');

      if (!token || !region) return <div>Invalid link</div>;

      return (
      <JoinWithTokenForm
      joinToken={token}
      region={region}
      onJoinSuccess={() => navigate('/room')}
      onCreateRoom={() => navigate('/')}
      />
      );
      }

      With custom labels for i18n:

      <JoinWithTokenForm
      joinToken={token}
      region={region}
      labels={{
      title: 'Unirse a la sala',
      joinButton: 'Unirse',
      nameLabel: 'Tu nombre',
      }}
      />