-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds Prettier to the project * Applies Prettier rules to project * Applies Prettier rules to new files in the project
- Loading branch information
1 parent
998ac1a
commit 49262ad
Showing
13 changed files
with
146 additions
and
117 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
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,7 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/coverage | ||
/mkdocs | ||
|
||
.next | ||
node_modules |
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,17 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"importOrder": [ | ||
"^react", | ||
"^react-native", | ||
"^[a-zA-Z]", | ||
"^@?\\w", | ||
"^@/?\\w", | ||
"^[./]" | ||
], | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true, | ||
"plugins": ["@trivago/prettier-plugin-sort-imports"], | ||
"tabWidth": 4 | ||
} |
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
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,17 +1,19 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoProductBlocksPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
export const ProductBlocksPage = () => { | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
export const ProductBlocksPage = () => { | ||
return ( | ||
<WfoPolicyRenderPageFallback resource={PolicyResource.NAVIGATION_METADATA}> | ||
<WfoProductBlocksPage /> | ||
</WfoPolicyRenderPageFallback> | ||
<WfoPolicyRenderPageFallback | ||
resource={PolicyResource.NAVIGATION_METADATA} | ||
> | ||
<WfoProductBlocksPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
}; | ||
|
||
export default ProductBlocksPage; | ||
|
||
}; | ||
|
||
export default ProductBlocksPage; |
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,15 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoProductsPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
export const ProductsPage = () => ( | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
export const ProductsPage = () => ( | ||
<WfoPolicyRenderPageFallback resource={PolicyResource.NAVIGATION_METADATA}> | ||
<WfoProductsPage /> | ||
<WfoProductsPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
|
||
export default ProductsPage; | ||
|
||
); | ||
|
||
export default ProductsPage; |
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,15 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoResourceTypesPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
export const ResourceTypesPage = () => ( | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
export const ResourceTypesPage = () => ( | ||
<WfoPolicyRenderPageFallback resource={PolicyResource.NAVIGATION_METADATA}> | ||
<WfoResourceTypesPage /> | ||
<WfoResourceTypesPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
|
||
export default ResourceTypesPage; | ||
|
||
); | ||
|
||
export default ResourceTypesPage; |
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,15 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoTasksPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
export const TasksPage = () => ( | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
export const TasksPage = () => ( | ||
<WfoPolicyRenderPageFallback resource={PolicyResource.NAVIGATION_METADATA}> | ||
<WfoTasksPage /> | ||
<WfoTasksPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
|
||
export default TasksPage; | ||
|
||
); | ||
|
||
export default TasksPage; |
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,15 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoWorkflowsPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
export const WorkflowsPage = () => ( | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
export const WorkflowsPage = () => ( | ||
<WfoPolicyRenderPageFallback resource={PolicyResource.NAVIGATION_METADATA}> | ||
<WfoWorkflowsPage /> | ||
<WfoWorkflowsPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
|
||
export default WorkflowsPage; | ||
|
||
); | ||
|
||
export default WorkflowsPage; |
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,15 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoSettingsPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
export const SettingsPage = () => ( | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
export const SettingsPage = () => ( | ||
<WfoPolicyRenderPageFallback resource={PolicyResource.NAVIGATION_SETTINGS}> | ||
<WfoSettingsPage /> | ||
<WfoSettingsPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
|
||
export default SettingsPage; | ||
|
||
); | ||
|
||
export default SettingsPage; |
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,17 +1,17 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
PolicyResource, | ||
WfoPolicyRenderPageFallback, | ||
WfoSubscriptionDetailPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import React from 'react'; | ||
|
||
const SubscriptionDetailPage = () => ( | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
const SubscriptionDetailPage = () => ( | ||
<WfoPolicyRenderPageFallback | ||
resource={PolicyResource.NAVIGATION_SUBSCRIPTIONS} | ||
resource={PolicyResource.NAVIGATION_SUBSCRIPTIONS} | ||
> | ||
<WfoSubscriptionDetailPage /> | ||
<WfoSubscriptionDetailPage /> | ||
</WfoPolicyRenderPageFallback> | ||
); | ||
|
||
export default SubscriptionDetailPage; | ||
|
||
); | ||
|
||
export default SubscriptionDetailPage; |
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,29 +1,30 @@ | ||
import React from 'react'; | ||
|
||
import { useRouter } from 'next/router'; | ||
|
||
import { | ||
PolicyResource, | ||
usePolicy, | ||
WfoPageUnauthorized, | ||
WfoProcessDetailPage, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
import { useRouter } from 'next/router'; | ||
import React from 'react'; | ||
|
||
const TaskDetailPage = () => { | ||
usePolicy, | ||
} from '@orchestrator-ui/orchestrator-ui-components'; | ||
|
||
const TaskDetailPage = () => { | ||
const router = useRouter(); | ||
const { taskId } = router.query; | ||
|
||
const { isAllowed } = usePolicy(); | ||
if (!isAllowed(PolicyResource.NAVIGATION_TASKS)) { | ||
return <WfoPageUnauthorized />; | ||
return <WfoPageUnauthorized />; | ||
} | ||
|
||
return ( | ||
<> | ||
{(taskId && typeof taskId === 'string' && ( | ||
<WfoProcessDetailPage processId={taskId} /> | ||
)) || <div>Invalid taskId</div>} | ||
</> | ||
<> | ||
{(taskId && typeof taskId === 'string' && ( | ||
<WfoProcessDetailPage processId={taskId} /> | ||
)) || <div>Invalid taskId</div>} | ||
</> | ||
); | ||
}; | ||
|
||
export default TaskDetailPage; | ||
|
||
}; | ||
|
||
export default TaskDetailPage; |