-
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.
Merge branch 'feature/add-more-templates' into main
- Loading branch information
Showing
50 changed files
with
2,394 additions
and
1,301 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
dist/ | ||
.idea/ |
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
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
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,32 @@ | ||
import React from 'react'; | ||
import { WaitUntil } from "chayns-api"; | ||
import { SmallWaitCursor } from "chayns-components"; | ||
import { useSelector } from "react-redux"; | ||
import { selectCount } from "../redux-modules/counter/counterSelectors"; | ||
|
||
const App = () => { | ||
const counter = useSelector(selectCount); | ||
|
||
const taskList = [ | ||
// tasks on first level are executed parallel | ||
() => chayns.ready, | ||
() => new Promise((resolve) => {setTimeout(resolve, 1000)}), // Add your initial Requests, textstrings here | ||
[ | ||
// tasks in second level are executed one after another | ||
] | ||
] | ||
|
||
return (<div className="{{ package-name-underscore }}"> | ||
<WaitUntil | ||
tasks={taskList} | ||
loadingComponent={( | ||
<div style={{ textAlign: 'center' }}> | ||
<SmallWaitCursor show/> | ||
</div> | ||
)} | ||
> | ||
<h1>Hi! Welcome to your newly created chayns application! {counter}</h1> | ||
</WaitUntil></div>); | ||
}; | ||
|
||
export default App; |
20 changes: 20 additions & 0 deletions
20
templates/api-v5/page-module-redux/src/components/AppWrapper.jsx
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,20 @@ | ||
import React from 'react'; | ||
import { ChaynsProvider, withCompatMode } from "chayns-api"; | ||
import App from "./App"; | ||
import store from '../redux-modules'; | ||
import { Provider } from "react-redux"; | ||
|
||
const AppWrapper = ({ ...props }) => { | ||
return ( | ||
<div className="tapp"> | ||
{/* eslint-disable-next-line react/jsx-props-no-spreading */} | ||
<ChaynsProvider {...props}> | ||
<Provider store={store}> | ||
<App/> | ||
</Provider> | ||
</ChaynsProvider> | ||
</div> | ||
) | ||
} | ||
|
||
export default withCompatMode(AppWrapper); |
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,3 @@ | ||
h1 { | ||
color: red; | ||
} |
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,30 @@ | ||
import React from 'react'; | ||
import { WaitUntil } from "chayns-api"; | ||
import { SmallWaitCursor } from "chayns-components"; | ||
import './app.scss'; | ||
|
||
const App = () => { | ||
|
||
const taskList = [ | ||
// tasks in first level are executed one after another | ||
() => chayns.ready, | ||
() => new Promise((resolve) => {setTimeout(resolve, 1000)}), // Add your initial Requests, textstrings here | ||
[ | ||
// tasks on second level are executed parallel | ||
] | ||
] | ||
|
||
return (<div className="{{ package-name-underscore }}"> | ||
<WaitUntil | ||
tasks={taskList} | ||
loadingComponent={( | ||
<div style={{ textAlign: 'center' }}> | ||
<SmallWaitCursor show/> | ||
</div> | ||
)} | ||
> | ||
<h1>Hi! Welcome to your newly created chayns application!</h1> | ||
</WaitUntil></div>); | ||
}; | ||
|
||
export default App; |
Oops, something went wrong.