-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(PAYMENTS-18857): add start page
- Loading branch information
1 parent
65aa15f
commit ce6df80
Showing
74 changed files
with
5,666 additions
and
989 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_CDN_URL=https://cdn.xsolla.net/headless-checkout-prod/assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_CDN_URL=https://cdn.xsolla.net/headless-checkout-prod/assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,17 @@ | ||
import { createBrowserRouter, RouterProvider } from 'react-router-dom'; | ||
import Layout from './layout.tsx'; | ||
import { NoMatch } from './routes/not-found'; | ||
import { Home } from './routes/home'; | ||
import { LocalizationContextProvider } from './app/contexts/localization-context/localization-context-provider.tsx'; | ||
import React from 'react'; | ||
import { RouterProvider } from 'react-router-dom'; | ||
|
||
const router = createBrowserRouter([ | ||
{ | ||
path: '/', | ||
element: <Layout />, | ||
children: [ | ||
{ | ||
index: true, | ||
element: <Home />, | ||
}, | ||
{ | ||
path: '*', | ||
element: <NoMatch />, | ||
}, | ||
], | ||
}, | ||
]); | ||
import { router } from './routes'; | ||
import { Provider } from 'react-redux'; | ||
import { store } from './redux/store.ts'; | ||
import { LocalizationContextProvider } from './app/contexts/localization-context/localization-context-provider.tsx'; | ||
|
||
export default function App() { | ||
return ( | ||
<LocalizationContextProvider> | ||
<RouterProvider router={router} /> | ||
</LocalizationContextProvider> | ||
<Provider store={store}> | ||
<LocalizationContextProvider> | ||
<RouterProvider router={router} /> | ||
</LocalizationContextProvider> | ||
</Provider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import axios from 'axios'; | ||
|
||
const tokenUrl = 'https://us-central1-headless-checkout-app.cloudfunctions.net/generateToken'; | ||
export const tokenApiClient = axios.create({ | ||
baseURL: tokenUrl, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { tokenApiClient } from '../client'; | ||
|
||
export const getToken = async (parameters: { sandbox: boolean }): Promise<string> => { | ||
const { sandbox } = parameters; | ||
const response = await tokenApiClient.get('', { | ||
params: { ...(sandbox ? { sandbox: '1' } : {}) }, | ||
}); | ||
if (response.data.error) { | ||
throw new Error(response.data.error.message); | ||
} | ||
|
||
return response.data.result; | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.