Skip to content

Commit

Permalink
[issue-232] Do not use trailing slashes for routes (#317)
Browse files Browse the repository at this point in the history
Co-authored-by: Rhys Bartels-Waller <rhys.bartelswaller@iohk.io>
  • Loading branch information
DominikGuzei and rhyslbw committed Jul 3, 2020
1 parent e42385e commit b43dd8a
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Expand Up @@ -84,7 +84,7 @@ module.exports = withPlugins(
modern: true,
polyfillsOptimization: true
},
exportTrailingSlash: true,
exportTrailingSlash: false,
/**
* Generate language specific pages under /[locale]/... paths e.g:
* /de/ leads to the the German landing page
Expand Down
2 changes: 1 addition & 1 deletion source/features/address/config.ts
@@ -1 +1 @@
export const ADDRESS_SEARCH_RESULT_PATH = '/address/';
export const ADDRESS_SEARCH_RESULT_PATH = '/address';
2 changes: 1 addition & 1 deletion source/features/blocks/config.ts
Expand Up @@ -2,4 +2,4 @@ export const BLOCK_BROWSE_PATH = '/browse-blocks';
export const BLOCKS_PER_PAGE_DEFAULT = 20;
export const BLOCKS_PER_PAGE_MAXIMUM = 50;
export const BLOCKS_PER_PAGE_MINIMUM = 5;
export const BLOCK_SEARCH_RESULT_PATH = '/block/';
export const BLOCK_SEARCH_RESULT_PATH = '/block';
4 changes: 2 additions & 2 deletions source/features/epochs/config.ts
@@ -1,5 +1,5 @@
export const EPOCH_SEARCH_RESULT_PATH = '/epoch/';
export const EPOCH_BROWSE_PATH = '/browse-epochs/';
export const EPOCH_SEARCH_RESULT_PATH = '/epoch';
export const EPOCH_BROWSE_PATH = '/browse-epochs';
export const EPOCH_BLOCKS_PER_PAGE = 10;
export const EPOCHS_PER_PAGE_DEFAULT = 10;
export const EPOCHS_PER_PAGE_MINIMUM = 5;
Expand Down
2 changes: 1 addition & 1 deletion source/features/errors/PageNotFoundError.tsx
Expand Up @@ -35,7 +35,7 @@ export default (props: IErrorProps) => {
</div>
<p className={styles.bottomContainerText}>{notFoundText}</p>
<div className={styles.bottomContainerLinks}>
<LocalizedLink href="/">
<LocalizedLink href="">
<span className={styles.bottomContainerLink}>
{translate('404:error.explorerTitle')}
</span>
Expand Down
2 changes: 1 addition & 1 deletion source/features/search/config.ts
@@ -1 +1 @@
export const NO_SEARCH_RESULTS_PATH = '/no-search-results/';
export const NO_SEARCH_RESULTS_PATH = '/no-search-results';
Expand Up @@ -19,7 +19,7 @@ export default ({ onAcceptUnmoderatedData }: IUnmoderatedDataWarning) => {
<p>{translate('stakePools.unmoderatedContent')}</p>
</div>
<div className={styles.contentBottom}>
<LocalizedLink href="/">
<LocalizedLink href="">
<span>{translate('stakePools.unmoderatedLeave')}</span>
</LocalizedLink>
<button onClick={onAcceptUnmoderatedData}>
Expand Down
2 changes: 1 addition & 1 deletion source/features/transactions/config.ts
@@ -1 +1 @@
export const TRANSACTION_SEARCH_RESULT_PATH = '/transaction/';
export const TRANSACTION_SEARCH_RESULT_PATH = '/transaction';
6 changes: 3 additions & 3 deletions source/widgets/layout/Header.tsx
Expand Up @@ -52,12 +52,12 @@ export const Header = observer((props: IHeaderProps) => {
<div className={styles.contentContainer}>
<div className={styles.brandType}>
<div className={styles.logoContainer}>
<LocalizedLink href="/">
<LocalizedLink href="">
<CardanoLogo className={styles.logo} />
</LocalizedLink>
</div>
<div className={styles.titleContainer}>
<LocalizedLink href="/">
<LocalizedLink href="">
<span className={styles.cardanoTitle}>Cardano</span>
<span className={styles.explorerTitle}>
{translate('header.explorer')}
Expand All @@ -69,7 +69,7 @@ export const Header = observer((props: IHeaderProps) => {
<div className={styles.tabs}>
<div className={styles.tabLeftLine} />
<div className={styles.tabCircle} />
<LocalizedLink href="/">
<LocalizedLink href="">
<span className={indexClassName}>
{translate('header.epochsBlocks')}
</span>
Expand Down

0 comments on commit b43dd8a

Please sign in to comment.