How to use the routes.getPath function in routes

To help you get started, we’ve selected a few routes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / delphin / app / components / ui / language-picker / index.js View on Github external
handleChange( event ) {
		const locale = event.target.value;
		const currentLanguage = this.getCurrentLanguage();
		const nextLanguage = find( config( 'languages' ), { langSlug: locale } );

		if ( currentLanguage.isRtl !== nextLanguage.isRtl ) {
			// RTL and LTR languages use a different build, so we need to
			// reload the page if the language direction changes
			window.location.href = getPath( 'home', {}, { locale } );
		} else {
			this.props.switchLocale( locale );
			this.props.hideSelect();
		}
	}
github Automattic / delphin / app / components / containers / search-form.js View on Github external
redirectToSearch( query, numberOfResultsToDisplay ) {
			if ( query !== ownProps.location.query.q || config( 'initial_number_of_search_results' ) === numberOfResultsToDisplay ) {
				// reset the result count when the query changes and hide it from the url if it is the default
				numberOfResultsToDisplay = undefined;
			}

			dispatch( push( {
				pathname: getPath( 'search' ),
				query: { q: query, r: numberOfResultsToDisplay }
			} ) );
		}
	} )
github Automattic / delphin / app / components / ui / update-contact-information / index.js View on Github external
<p>
					{ i18n.translate( 'You may be asked to approve these changes for each domain separately. ' +
										"We'll email you with instructions." ) }
					</p>
				}

				<p>
					{ i18n.translate(
						'By clicking "Update contact information", you agree to the ' +
						'{{draLink}}Domain Registration Agreement{{/draLink}} and confirm that if you are transferring ownership of the domain, ' +
						'the new owner has agreed in writing to be bound by the same agreement. {{faqLink}}What does this mean?{{/faqLink}}',
						{
							components: {
								draLink: <a rel="noopener noreferrer" href="https://wordpress.com/automattic-domain-name-registration-agreement/">,
								faqLink: </a><a rel="noopener noreferrer" href="{">
							}
						}
					) }
				</a></p><a rel="noopener noreferrer" href="{">
			
		);
	}
</a>
github Automattic / delphin / app / components / containers / home.js View on Github external
selectDomain( domainProduct, isUserLoggedIn ) {
			dispatch( selectDomain( domainProduct ) );

			if ( isUserLoggedIn ) {
				dispatch( push( getPath( 'contactInformation' ) ) );
			} else {
				dispatch( push( getPath( 'signupUser' ) ) );
			}
		}
	} ),
github Automattic / delphin / app / components / containers / home.js View on Github external
redirectToSearch( query ) {
			dispatch( push( {
				pathname: getPath( 'search' ),
				query: { q: query }
			} ) );
		},
github Automattic / delphin / app / components / ui / set-up-domain / connect-new-blog-to-other / index.js View on Github external
<button disabled="{">
							{ i18n.translate( 'Contact domain assistant', {
								comment: 'The domain assistant is our customer support team'
							} ) }
						</button>
					
					
						
					
				

				<div>
					
				</div>
			
		);
	}
}
github Automattic / delphin / app / components / ui / learn-more / index.js View on Github external
}
							} ) }<p></p>
						

						<div id="sawbuck">
							<h3>{ i18n.translate( 'What is wordpress.sawbuck.com?' ) }</h3>

							<p>{ i18n.translate( 'The domain sawbuck.com is used internally by get.blog. When registering a new domain, you may receive an email to verify your contact information. It is sent from help@wordpress.sawbuck.com, and contains a link to validate.sawbuck.com. This is a legitimate get.blog email, and the link is safe to click.' ) }</p>
						</div>

						<div id="connect-domain">
							<h3>{ i18n.translate( 'How do I connect my domain to my site?' ) }</h3>

							<p>{ i18n.translate( 'Go to {{link}}My Domains{{/link}} to see all your domains and set them up. If your domain is already connected, you may have to reset it to the default settings before you can start the set up again.', {
								components: {
									link: 
								}
							} ) }</p>
						</div>

						<div id="nameservers">
							<h3>{ i18n.translate( 'How do I set custom name servers?' ) }</h3>

							<p>{ i18n.translate( 'To choose custom servers for your domain, start setting it up from {{link}}My Domains{{/link}}, and then choose “Configure manually” on the next screen. If your domain is already connected, you may have to reset it to the default settings before you can start the set up again.', {
								components: {
									link: 
								}
							} ) }</p>
						</div>

						<div id="transfer">
							<h3>{ i18n.translate( 'Can I transfer my domain?' ) }</h3></div>
github Automattic / delphin / app / components / ui / set-up-domain / select-new-blog-host / index.js View on Github external
<h3>{ i18n.translate( 'Want a different blogging platform?' ) }</h3>
						<p>
							{ i18n.translate( 'We\'ll be adding more options for automatic set up soon. In the meantime, our Domain Assistants can help you {{link}}find the best place to start your new blog{{/link}}.', {
								components: { link:  }
							} ) }
						</p>
					
				

				<div>
					
				</div>
			
		);
	}
}
github Automattic / delphin / app / components / ui / set-up-domain / select-new-blog-needs / index.js View on Github external
'and require total control over all features.' ), 2 )
								}
							<p></p>
						
					
					
						<button disabled="{">
							{ i18n.translate( 'Next' ) }
						</button>
					
				

				<div>
					
				</div>
			
		);
	}
}
github Automattic / delphin / app / components / ui / set-up-domain / contact-concierge / index.js View on Github external
{ ...removeInvalidInputProps( message ) }
						/&gt;
					

					
						<button disabled="{">
							{ i18n.translate( 'Contact our domain assistant' ) }
						</button>
					
					
						
					
				

				<div>
					
						{ i18n.translate( 'Back' ) }
					
				</div>
			
		);
	}
}

routes

Minimalist route matching for javascript

Unknown
Latest version published 9 years ago

Package Health Score

48 / 100
Full package analysis