Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

651 B
Raw Blame
import { createFileRoute } from '@tanstack/react-router'
import { z } from 'zod/v4'
import { ResetPasswordPage } from '../pages/reset-password'

const resetSearchSchema = z.object({
  token: z.string().min(1).optional(),
})

export const Route = createFileRoute('/reset-password')({
  validateSearch: resetSearchSchema,
  component: ResetPassword,
})

function ResetPassword() {
  const { token } = Route.useSearch()

  // No redirect for a live session: someone following a reset link means to
  // change their password, and a stale session in the same browser must not
  // silently swallow the link.
  return <ResetPasswordPage token={token} />
}