Skip to content

Commit

Permalink
Revert "chore(set): Use the existing AvailableRoutes type (#11767)" (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Jan 17, 2025
1 parent 2e65018 commit 4ee5661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/router/src/Set.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ReactElement, ReactNode } from 'react'
import React from 'react'

import type { AvailableRoutes } from '@redwoodjs/router'
import type { routes } from '@redwoodjs/router'

type SetProps<P> = (P extends React.FC ? React.ComponentProps<P> : unknown) & {
/**
Expand All @@ -22,7 +22,7 @@ type SetProps<P> = (P extends React.FC ? React.ComponentProps<P> : unknown) & {
*
* @deprecated Please use `<PrivateSet>` instead and specify this prop there
*/
unauthenticated?: keyof AvailableRoutes
unauthenticated?: keyof typeof routes
/**
* Route is permitted when authenticated and user has any of the provided
* roles such as "admin" or ["admin", "editor"]
Expand All @@ -47,7 +47,7 @@ export function Set<WrapperProps>(props: SetProps<WrapperProps>) {

type PrivateSetProps<P> = Omit<SetProps<P>, 'private' | 'unauthenticated'> & {
/** The page name where a user will be redirected when not authenticated */
unauthenticated: keyof AvailableRoutes
unauthenticated: keyof typeof routes
}

/** @deprecated Please use `<PrivateSet>` instead */
Expand Down

0 comments on commit 4ee5661

Please sign in to comment.