Skip to content

Commit

Permalink
Revert "Revert "Change HashRoute to BrowserRoute""
Browse files Browse the repository at this point in the history
This reverts commit 3bd80f4.
  • Loading branch information
thi-investax committed Jan 6, 2025
1 parent 6e9af83 commit f94d2a2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion e2e_tests/page-object/adminPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class AdminPage extends WebPage {
readonly rejectAnnotationTextField: Locator;
readonly submitRejectAnnotationButton: Locator;

kycAdminURL = config.use.baseURL + '#/admin/kyc';
kycAdminURL = config.use.baseURL + '/admin/kyc';

constructor(page: Page, context?: BrowserContext) {
super(page, context);
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/page-object/kycPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class KycPage extends WebPage {
readonly countryOfTaxDeclarationDropdown: Locator;
readonly taxIdentificationNumberField: Locator;

kycURL = config.use.baseURL + '#/kyc';
kycURL = config.use.baseURL + '/kyc';
pendingApprovalText = 'Pending approval';
changesRequestedText = 'Changes Requested';
rejectedText = 'Rejected';
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/page-object/liquidityPoolsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class LiquidityPoolsPage extends WebPage {
}

async removeCreatedLiqudityPool(pool) {
await this.page.goto(config.use.baseURL + '#/pool')
await this.page.goto(config.use.baseURL + '/pool')
await this.removeLiquidityPool(pool);
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/Launchpad/InvestmentCard/PreviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface Props {
}

const handleRedirect = () => {
window.location.href = '/#/kyc';
window.location.href = '/kyc';
};

export const PreviewModal = ({ isModalOpen, closeModal, offer }: Props) => {
Expand Down Expand Up @@ -63,7 +63,7 @@ export const PreviewModal = ({ isModalOpen, closeModal, offer }: Props) => {
<div style={{ marginBottom: '10px', marginTop: isMobile ? '15px' : '' }}>
<OfferSaleAllocation {...offer} />
</div>


{offer.hasPresale && (
<div style={{ marginTop: '10px' }}>
Expand All @@ -90,15 +90,15 @@ export const PreviewModal = ({ isModalOpen, closeModal, offer }: Props) => {
<span style={{ fontSize: '16px', fontWeight: '800', color: '#292933', width: isMobile ? '100%' : '60%' }}>
This deal is only available to KYC-ed users
</span>
{!isMobile && <PinnedContentButton onClick={handleRedirect} style={{ width: '190px' }}>Complete KYC</PinnedContentButton>}
{!isMobile && <PinnedContentButton onClick={handleRedirect} style={{ width: '190px' }}>Complete KYC</PinnedContentButton>}
</div>
<div>
<span style={{ color: '#666680', fontSize: '13px', fontWeight: '600' }}>
Become a KYC-ed user by connecting your wallet and completing your KYC.
</span>

</div>
{isMobile && <PinnedContentButton onClick={handleRedirect} style={{ marginTop: '18px' }}>Complete KYC</PinnedContentButton>}
{isMobile && <PinnedContentButton onClick={handleRedirect} style={{ marginTop: '18px' }}>Complete KYC</PinnedContentButton>}
</div>
</ModalContent>
</ModalContainer>
Expand Down
9 changes: 5 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-disable react/no-deprecated */
import { CookiesProvider } from 'react-cookie'
import React, { StrictMode } from 'react'
import { isMobile } from 'react-device-detect'
import ReactDOM from 'react-dom/client'
import ReactGA from 'react-ga'
import { Provider } from 'react-redux'
import { HashRouter } from 'react-router-dom'
import { BrowserRouter } from 'react-router-dom'
import { LocalizationProvider } from '@material-ui/pickers'
import DayJsUtils from '@material-ui/pickers/adapter/dayjs'
import { PersistGate } from 'redux-persist/integration/react'
import * as Sentry from '@sentry/react'
import { ToastContainer } from 'react-toastify'

import { MuiThemeProvider } from './theme/muiTheme'
Expand All @@ -25,6 +25,7 @@ import TransactionUpdater from './state/transactions/updater'
import UserUpdater from './state/user/updater'
import ThemeProvider, { ThemedGlobalStyle } from './theme'
import Web3Provider from 'components/Web3Provider'
import * as Sentry from '@sentry/react'

import 'react-toastify/dist/ReactToastify.css'
import 'react-phone-input-2/lib/bootstrap.css'
Expand Down Expand Up @@ -92,7 +93,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
<StrictMode>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<HashRouter>
<BrowserRouter>
<LanguageProvider>
<Web3Provider>
<Blocklist>
Expand All @@ -113,7 +114,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
</Blocklist>
</Web3Provider>
</LanguageProvider>
</HashRouter>
</BrowserRouter>
</PersistGate>
</Provider>
</StrictMode>
Expand Down

0 comments on commit f94d2a2

Please sign in to comment.