Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added a wrapper for the react-router-dom navigate hook #34

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

Tommylans
Copy link
Member

Signed-off-by: Tom Lanser tom@animo.id

Signed-off-by: Tom Lanser <tom@animo.id>
Signed-off-by: Tom Lanser <tom@animo.id>
@@ -9,6 +9,8 @@ import { AgentHomeScreen } from './pages/agent/AgentHomeScreen'
import { ConnectionsScreen } from './pages/agent/connections/ConnectionsScreen'
import { CredentialsScreen } from './pages/agent/credentials/CredentialsScreen'

export const routeUrls = ['/', '/setup', '/agent', '/agent/connections', '/agent/credentials', '/agent/proofs'] as const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would want to infer this from the routes object below. Can you create an issue for this?


type Routes = typeof routeUrls
// eslint-disable-next-line @typescript-eslint/ban-types
type ExtractValues<T extends string, U extends object = {}> = T extends `${string}{${infer V}}${infer Rest}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also create an issue to fix this? I might be able to look at it someday, but if this works for now that is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation should be a wrapper around w/e react-router-dom returns. So we can do:
2 participants