Skip to content

Commit 0f60a05

Browse files
authored
Merge pull request #966 from topcoder-platform/feat/wallet-admin
feat: add wallet-admin app
2 parents 56f2a72 + 220f7dd commit 0f60a05

File tree

134 files changed

+3931
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+3931
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ workflows:
257257
branches:
258258
only:
259259
- dev
260-
- TSJR-314_skill-manager_landing-page
260+
- feat/wallet-admin
261261

262262
- deployQa:
263263
context: org-global

craco.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ module.exports = {
4444
'@talentSearch': resolve('src/apps/talent-search/src'),
4545
'@profiles': resolve('src/apps/profiles/src'),
4646
'@wallet': resolve('src/apps/wallet/src'),
47+
'@walletAdmin': resolve('src/apps/wallet-admin/src'),
4748

4849
'@platform': resolve('src/apps/platform/src'),
4950
// aliases used in SCSS files

src/apps/platform/src/platform.routes.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { accountsRoutes } from '~/apps/accounts'
1111
import { onboardingRoutes } from '~/apps/onboarding'
1212
import { adminRoutes } from '~/apps/admin'
1313
import { walletRoutes } from '~/apps/wallet'
14+
import { walletAdminRoutes } from '~/apps/wallet-admin'
1415

1516
const Home: LazyLoadedComponent = lazyLoad(
1617
() => import('./routes/home'),
@@ -38,6 +39,7 @@ export const platformRoutes: Array<PlatformRoute> = [
3839
...talentSearchRoutes,
3940
...profilesRoutes,
4041
...walletRoutes,
42+
...walletAdminRoutes,
4143
...accountsRoutes,
4244
...adminRoutes,
4345
...homeRoutes,

src/apps/wallet-admin/.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": false,
3+
"trailingComma": "all",
4+
"jsxSingleQuote": true,
5+
"jsxBracketSameLine": true,
6+
"printWidth": 120
7+
}

src/apps/wallet-admin/README.md

Whitespace-only changes.

src/apps/wallet-admin/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './src'
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { FC, useContext } from 'react'
2+
import { Outlet, Routes } from 'react-router-dom'
3+
4+
import { routerContext, RouterContextData } from '~/libs/core'
5+
6+
import { toolTitle } from './wallet-admin.routes'
7+
import { WalletSwr } from './lib'
8+
9+
const AccountsApp: FC<{}> = () => {
10+
const { getChildRoutes }: RouterContextData = useContext(routerContext)
11+
12+
return (
13+
<WalletSwr>
14+
<Outlet />
15+
<Routes>{getChildRoutes(toolTitle)}</Routes>
16+
</WalletSwr>
17+
)
18+
}
19+
20+
export default AccountsApp
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { FC, useContext } from 'react'
2+
3+
import { profileContext, ProfileContextData } from '~/libs/core'
4+
import { LoadingSpinner } from '~/libs/ui'
5+
6+
import { WalletAdminLayout } from './page-layout'
7+
8+
const AccountSettingsPage: FC<{}> = () => {
9+
const { profile, initialized }: ProfileContextData = useContext(profileContext)
10+
11+
return (
12+
<>
13+
<LoadingSpinner hide={initialized} />
14+
{initialized && profile && <WalletAdminLayout profile={profile} />}
15+
</>
16+
)
17+
}
18+
19+
export default AccountSettingsPage
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as WalletHomePage } from './WalletAdminHomePage'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import '@libs/ui/styles/includes';
2+
3+
.contentLayoutOuter {
4+
margin: $sp-8 auto !important;
5+
}

0 commit comments

Comments
 (0)