All files / src/screens PairDevice.tsx

66.66% Statements 2/3
100% Branches 0/0
50% Functions 1/2
66.66% Lines 2/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31        1x   1x                                                
import { useNavigate } from 'react-router-dom'
import DeviceCodeEntry from '../components/DeviceCodeEntry'
 
export default function PairDevice() {
  const navigate = useNavigate()
 
  return (
    <div className="flex min-h-screen items-center justify-center bg-background p-4">
      <div className="w-full max-w-sm space-y-6">
        <div className="text-center">
          <h1 className="text-2xl font-bold text-foreground">Pair a Device</h1>
          <p className="mt-1 text-sm text-muted-foreground">
            Enter the code shown on the device you want to pair
          </p>
        </div>
 
        <DeviceCodeEntry />
 
        <div className="text-center">
          <button
            onClick={() => navigate(-1)}
            className="text-sm text-muted-foreground hover:text-foreground"
          >
            Go back
          </button>
        </div>
      </div>
    </div>
  )
}
 
← Back to Dashboard