File tree Expand file tree Collapse file tree 3 files changed +32
-34
lines changed
packages/apps/human-app/frontend/src Expand file tree Collapse file tree 3 files changed +32
-34
lines changed Original file line number Diff line number Diff line change @@ -37,21 +37,22 @@ export async function getOracles({
3737 signal : AbortSignal ;
3838} ) {
3939 let oracles = [ H_CAPTCHA_ORACLE ] ;
40- const queryParams = selected_job_types . length
41- ? `?${ stringifyUrlQueryObject ( { selected_job_types } ) } `
42- : '' ;
40+ if ( env . VITE_FEATURE_FLAG_JOBS_DISCOVERY ) {
41+ const queryParams = selected_job_types . length
42+ ? `?${ stringifyUrlQueryObject ( { selected_job_types } ) } `
43+ : '' ;
4344
44- const result = await apiClient (
45- `${ apiPaths . worker . oracles . path } ${ queryParams } ` ,
46- {
47- successSchema : OraclesSuccessSchema ,
48- options : { method : 'GET' } ,
49- } ,
50- signal
51- ) ;
52-
53- oracles = oracles . concat ( result ) ;
45+ const result = await apiClient (
46+ `${ apiPaths . worker . oracles . path } ${ queryParams } ` ,
47+ {
48+ successSchema : OraclesSuccessSchema ,
49+ options : { method : 'GET' } ,
50+ } ,
51+ signal
52+ ) ;
5453
54+ oracles = oracles . concat ( result ) ;
55+ }
5556 return oracles ;
5657}
5758
Original file line number Diff line number Diff line change @@ -5,24 +5,21 @@ import type {
55} from '@/components/layout/protected/drawer-navigation' ;
66import { HelpIcon , UserOutlinedIcon , WorkIcon } from '@/components/ui/icons' ;
77import { routerPaths } from '@/router/router-paths' ;
8- import { env } from '@/shared/env' ;
98import { DarkModeSwitch } from '@/components/ui/dark-mode-switch' ;
109import type { UserData } from '@/auth/auth-context' ;
1110
1211export const workerDrawerTopMenuItems = (
1312 user : UserData | null
1413) : TopMenuItem [ ] => {
1514 return [
16- ...( env . VITE_FEATURE_FLAG_JOBS_DISCOVERY
17- ? [
18- {
19- label : t ( 'components.DrawerNavigation.jobs' ) ,
20- icon : < WorkIcon /> ,
21- link : routerPaths . worker . jobsDiscovery ,
22- disabled : ! user ?. wallet_address || user . kyc_status !== 'approved' ,
23- } ,
24- ]
25- : [ ] ) ,
15+ ...[
16+ {
17+ label : t ( 'components.DrawerNavigation.jobs' ) ,
18+ icon : < WorkIcon /> ,
19+ link : routerPaths . worker . jobsDiscovery ,
20+ disabled : ! user ?. wallet_address || user . kyc_status !== 'approved' ,
21+ } ,
22+ ] ,
2623 ] ;
2724} ;
2825
Original file line number Diff line number Diff line change @@ -90,18 +90,18 @@ export const protectedRoutes: {
9090 headerText : t ( 'protectedPagesHeaders.profile' ) ,
9191 } ,
9292 } ,
93+ {
94+ routerProps : {
95+ path : routerPaths . worker . jobsDiscovery ,
96+ element : < JobsDiscoveryPage /> ,
97+ } ,
98+ pageHeaderProps : {
99+ headerIcon : < HomepageWorkIcon /> ,
100+ headerText : t ( 'protectedPagesHeaders.jobsDiscovery' ) ,
101+ } ,
102+ } ,
93103 ...( env . VITE_FEATURE_FLAG_JOBS_DISCOVERY
94104 ? [
95- {
96- routerProps : {
97- path : routerPaths . worker . jobsDiscovery ,
98- element : < JobsDiscoveryPage /> ,
99- } ,
100- pageHeaderProps : {
101- headerIcon : < HomepageWorkIcon /> ,
102- headerText : t ( 'protectedPagesHeaders.jobsDiscovery' ) ,
103- } ,
104- } ,
105105 {
106106 routerProps : {
107107 path : `${ routerPaths . worker . jobs } /:address` ,
You can’t perform that action at this time.
0 commit comments