Skip to content

Commit 9ec5a0d

Browse files
refactor(website): refactor website to react again
1 parent 8df1180 commit 9ec5a0d

File tree

42 files changed

+80
-1022
lines changed

Some content is hidden

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

42 files changed

+80
-1022
lines changed

packages/overmind-website/api/components.md

Lines changed: 0 additions & 105 deletions
This file was deleted.

packages/overmind-website/backend/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
}
154154
}
155155
</style>
156+
156157
<link
157158
href="https://fonts.googleapis.com/css?family=Source+Code+Pro"
158159
rel="stylesheet"
@@ -164,13 +165,12 @@
164165
</head>
165166

166167
<body>
167-
<div id="overmind-app">
168-
<div id="overmind-loader">
169-
<div id="overmind-circle"></div>
170-
<div id="overmind-inner-circle"></div>
171-
<div id="overmind-block"></div>
172-
<div id="overmind-text">overmind</div>
173-
</div>
168+
<div id="overmind-app"></div>
169+
<div id="overmind-loader">
170+
<div id="overmind-circle"></div>
171+
<div id="overmind-inner-circle"></div>
172+
<div id="overmind-block"></div>
173+
<div id="overmind-text">overmind</div>
174174
</div>
175175
</body>
176176
</html>

packages/overmind-website/demos.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
"title": "Simple app",
44
"sandboxes": {
5-
"components": "https://codesandbox.io/embed/qv1n35yrlj?fontsize=12&codemirror=1&module=%2Fsrc%2FPosts.jsx",
65
"react": "https://codesandbox.io/embed/qv1n35yrlj?fontsize=12&codemirror=1&module=%2Fsrc%2FPosts.jsx",
76
"react_ts": "https://codesandbox.io/embed/0yz8k00orv?fontsize=12&codemirror=1&module=%2Fsrc%2FPosts.tsx",
87
"angular": "https://stackblitz.com/edit/overmind-demo1-angular-next?embed=1&file=src/app/app.component.html",

packages/overmind-website/examples/api/connect.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
11
const javascript = {
2-
components: [
3-
{
4-
fileName: 'SomeComponent.js',
5-
code: `
6-
import { h, useOvermind } from 'overmind-components'
7-
8-
const SomeComponent = () => {
9-
const { state, actions } = useOvermind()
10-
11-
return (
12-
<div onClick={actions.onClick}>
13-
{state.foo}
14-
</div>
15-
)
16-
}
17-
18-
export default SomeComponent
19-
`,
20-
},
21-
],
222
react: [
233
{
244
fileName: 'SomeComponent.js',
@@ -59,26 +39,6 @@ export default connect({})
5939
}
6040

6141
const typescript = {
62-
components: [
63-
{
64-
fileName: 'SomeComponent.tsx',
65-
code: `
66-
import { h, Component, useOvermind } from 'overmind-components'
67-
68-
const SomeComponent: Component = () => {
69-
const { state, actions } = useOvermind()
70-
71-
return (
72-
<div onClick={actions.onClick}>
73-
{state.foo}
74-
</div>
75-
)
76-
}
77-
78-
export default SomeComponent
79-
`,
80-
},
81-
],
8242
react: [
8343
{
8444
fileName: 'SomeComponent.tsx',

packages/overmind-website/examples/guide/connectingcomponents/actions.ts

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,4 @@
11
const javascript = {
2-
components: [
3-
{
4-
fileName: 'app/actions.js',
5-
code: `
6-
export const toggleAwesomeApp = ({ state }) =>
7-
state.isAwesome = !state.isAwesome
8-
`,
9-
},
10-
{
11-
fileName: 'components/App.js',
12-
target: 'jsx',
13-
code: `
14-
import { h, useOvermind } from 'overmind-components'
15-
16-
const App = () => {
17-
const { actions } = useOvermind()
18-
return (
19-
<button onClick={actions.toggleAwesomeApp}>
20-
Toggle awesome
21-
</button>
22-
)
23-
}
24-
25-
export default App
26-
`,
27-
},
28-
],
292
react: [
303
{
314
fileName: 'app/actions.js',
@@ -80,35 +53,6 @@ export default connect({})
8053
}
8154

8255
const typescript = {
83-
components: [
84-
{
85-
fileName: 'app/actions.ts',
86-
code: `
87-
import { Action } from 'overmind'
88-
89-
export const toggleAwesomeApp: Action = ({ state }) =>
90-
state.isAwesome = !state.isAwesome
91-
`,
92-
},
93-
{
94-
fileName: 'components/App.tsx',
95-
code: `
96-
import { h, Component, useOvermind } from 'overmind-components'
97-
98-
const App: Component = () => {
99-
const { actions } = useOvermind()
100-
101-
return (
102-
<button onClick={actions.toggleAwesomeApp}>
103-
Toggle awesome
104-
</button>
105-
)
106-
}
107-
108-
export default App
109-
`,
110-
},
111-
],
11256
react: [
11357
{
11458
fileName: 'app/actions.ts',

packages/overmind-website/examples/guide/connectingcomponents/array_1.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
const javascript = {
2-
components: [
3-
{
4-
fileName: 'components/List.js',
5-
target: 'jsx',
6-
code: `
7-
import { h, useOvermind } from 'overmind-components'
8-
9-
const List = () => {
10-
const { state } = useOvermind()
11-
12-
return (
13-
<h1>{state.items}</h1>
14-
)
15-
}
16-
17-
export default List
18-
`,
19-
},
20-
],
212
react: [
223
{
234
fileName: 'components/List.js',
@@ -54,24 +35,6 @@ export default connect({})
5435
}
5536

5637
const typescript = {
57-
components: [
58-
{
59-
fileName: 'components/List.tsx',
60-
code: `
61-
import { h, Component, useOvermind } from 'overmind-components'
62-
63-
const List: Component = () => {
64-
const { state } = useOvermind()
65-
66-
return (
67-
<h1>{state.items}</h1>
68-
)
69-
}
70-
71-
export default List
72-
`,
73-
},
74-
],
7538
react: [
7639
{
7740
fileName: 'components/List.tsx',

packages/overmind-website/examples/guide/connectingcomponents/array_2.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
11
const javascript = {
2-
components: [
3-
{
4-
fileName: 'components/List.js',
5-
target: 'jsx',
6-
code: `
7-
import { h, useOvermind } from 'overmind-components'
8-
9-
const List = () => {
10-
const { state } = useOvermind()
11-
12-
return (
13-
<ul>
14-
{state.items.map(item =>
15-
<li key={item.id}>{item.title}</li>
16-
)}
17-
</ul>
18-
)
19-
}
20-
21-
export default List
22-
`,
23-
},
24-
],
252
react: [
263
{
274
fileName: 'components/List.js',
@@ -66,28 +43,6 @@ export default connect({})
6643
}
6744

6845
const typescript = {
69-
components: [
70-
{
71-
fileName: 'components/List.tsx',
72-
code: `
73-
import { h, Component, useOvermind } from 'overmind-components'
74-
75-
const List: Component = () => {
76-
const { state } = useOvermind()
77-
78-
return (
79-
<ul>
80-
{state.items.map(item =>
81-
<li key={item.id}>{item.title}</li>
82-
)}
83-
</ul>
84-
)
85-
}
86-
87-
export default App
88-
`,
89-
},
90-
],
9146
react: [
9247
{
9348
fileName: 'components/List.tsx',

0 commit comments

Comments
 (0)