create-oc 1.1.39 → 1.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
|
@@ -58,7 +58,7 @@ const templates = templateChoices.map((t) => t.value);
|
|
|
58
58
|
|
|
59
59
|
const esmVariantChoices = [
|
|
60
60
|
{ title: 'React', value: 'esm.react' },
|
|
61
|
-
{ title: 'Remix
|
|
61
|
+
{ title: 'Remix', value: 'esm.remix' },
|
|
62
62
|
];
|
|
63
63
|
const esmVariants = esmVariantChoices.map((t) => t.value);
|
|
64
64
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
type ActionOutput,
|
|
4
4
|
getInitialData,
|
|
5
5
|
} from 'oc-server/client';
|
|
6
|
-
import { type Handle } from '@remix-run/
|
|
6
|
+
import { on, type Handle } from '@remix-run/ui';
|
|
7
7
|
import styles from './styles.module.css';
|
|
8
8
|
import logo from '../public/logo.png';
|
|
9
9
|
|
|
@@ -26,32 +26,32 @@ export default function App(handle: Handle) {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return () => {
|
|
30
|
+
if (error) {
|
|
31
|
+
return <div>Something wrong happened!</div>;
|
|
32
|
+
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
return (
|
|
35
|
+
<div className={styles.container}>
|
|
36
|
+
<img width="50" height="50" src={logo} alt="Logo" />
|
|
37
|
+
<h1 style={{ margin: '0 0 20px 0' }}>
|
|
38
|
+
Hello, <span style={{ textDecoration: 'underline' }}>{firstName}</span>{' '}
|
|
39
|
+
{lastName}
|
|
40
|
+
</h1>
|
|
41
|
+
<div className={styles.info}>
|
|
42
|
+
<div className={styles.block}>Born: {born}</div>
|
|
43
|
+
<div className={styles.block}>
|
|
44
|
+
Hobbies: {hobbies.map((x) => x.toLowerCase()).join(', ')}
|
|
45
|
+
</div>
|
|
44
46
|
</div>
|
|
47
|
+
{additionalData && <div>{additionalData.funFact}</div>}
|
|
48
|
+
<button
|
|
49
|
+
className={styles.button}
|
|
50
|
+
mix={[on<HTMLButtonElement>('click', getFunFact)]}
|
|
51
|
+
>
|
|
52
|
+
Fun year fact
|
|
53
|
+
</button>
|
|
45
54
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className={styles.button}
|
|
49
|
-
on={{
|
|
50
|
-
click: getFunFact,
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
Fun year fact
|
|
54
|
-
</button>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
57
|
}
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
"moduleResolution": "bundler",
|
|
17
17
|
"resolveJsonModule": true,
|
|
18
18
|
"isolatedModules": true,
|
|
19
|
+
"types": [],
|
|
19
20
|
"jsx": "react-jsx",
|
|
20
|
-
"jsxImportSource": "@remix-run/
|
|
21
|
+
"jsxImportSource": "@remix-run/ui"
|
|
21
22
|
},
|
|
22
23
|
"include": ["src"],
|
|
23
24
|
"exclude": ["src/_package"]
|