MCPcopy Index your code
hub / github.com/coder/coder / embedRedirect

Function embedRedirect

site/src/utils/redirect.ts:8–11  ·  view source on GitHub ↗
(
	returnTo: string,
	navigateTo = "/login",
)

Source from the content-addressed store, hash-verified

6 * @returns URL containing a redirect query parameter
7 */
8export const embedRedirect = (
9 returnTo: string,
10 navigateTo = "/login",
11): string => `${navigateTo}?redirect=${encodeURIComponent(returnTo)}`;
12
13/**
14 * Retrieves a url from the query string of the current URL

Callers 2

redirect.test.tsFile · 0.90
RequireAuthFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected