create-waku 0.7.2 → 0.7.4
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/dist/index.js +1 -1
- package/package.json +2 -2
- package/template/01_template/gitignore +7 -0
- package/template/01_template/package.json +6 -6
- package/template/02_demo/package.json +6 -6
- package/template/02_demo/private/pokemon.json +2586 -0
- package/template/02_demo/src/components/footer.tsx +1 -1
- package/template/02_demo/src/components/header.tsx +9 -1
- package/template/02_demo/src/components/reload.tsx +16 -0
- package/template/02_demo/src/lib/pokemon.ts +5 -2586
- package/template/02_demo/src/templates/home-page.tsx +37 -23
- package/template/02_demo/src/templates/pokemon-page.tsx +46 -44
- package/template/02_demo/src/templates/root-layout.tsx +1 -1
- package/template/03_minimal/package.json +6 -6
- package/template/03_minimal/public/404.html +1 -0
- package/template/04_promise/package.json +6 -6
- package/template/04_promise/src/components/Counter.tsx +3 -0
- package/template/04_promise/src/components/Hello.tsx +7 -0
- package/template/05_actions/package.json +6 -6
- package/template/06_nesting/package.json +6 -6
- package/template/07_router/package.json +6 -6
- package/template/07_router/src/components/Counter.tsx +3 -1
- package/template/07_router/src/components/HomeLayout.tsx +2 -0
- package/template/07_router/src/entries.tsx +8 -1
- package/template/07_router/src/styles.css +3 -0
- package/template/08_cookies/package.json +7 -7
- package/template/08_cookies/src/entries.tsx +1 -1
- package/template/09_cssmodules/package.json +6 -6
- package/template/{10_dynamicroute → 10_fs-router}/package.json +6 -6
- package/template/11_form/package.json +6 -6
- package/template/12_css/package.json +7 -7
- package/template/13_path-alias/package.json +7 -7
- package/template/13_path-alias/src/components/App.tsx +4 -1
- package/template/13_path-alias/src/components/Counter.tsx +5 -1
- package/template/13_path-alias/src/components/MyFragment.tsx +5 -0
- package/template/14_react-tweet/package.json +25 -0
- package/template/14_react-tweet/postcss.config.js +7 -0
- package/template/14_react-tweet/public/images/favicon.png +0 -0
- package/template/14_react-tweet/src/components/error-boundary.tsx +28 -0
- package/template/14_react-tweet/src/components/footer.tsx +18 -0
- package/template/14_react-tweet/src/components/header.tsx +7 -0
- package/template/14_react-tweet/src/entries.tsx +18 -0
- package/template/14_react-tweet/src/main.tsx +19 -0
- package/template/14_react-tweet/src/styles.css +4 -0
- package/template/14_react-tweet/src/templates/home-page.tsx +22 -0
- package/template/14_react-tweet/src/templates/root-layout.tsx +33 -0
- package/template/14_react-tweet/tailwind.config.js +4 -0
- package/template/14_react-tweet/tsconfig.json +17 -0
- package/template/14_react-tweet/vite.config.ts +15 -0
- package/template/10_dynamicroute/vite.config.ts +0 -20
- /package/template/08_cookies/{db → private}/items.json +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/components/Counter.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/components/ErrorBoundary.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/entries.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/main.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/routes/bar/page.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/routes/foo/page.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/routes/layout.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/routes/nested/[name]/page.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/src/routes/page.tsx +0 -0
- /package/template/{10_dynamicroute → 10_fs-router}/tsconfig.json +0 -0
|
@@ -2,10 +2,18 @@ import { Link } from 'waku';
|
|
|
2
2
|
|
|
3
3
|
export const Header = () => {
|
|
4
4
|
return (
|
|
5
|
-
<header className="fixed left-0 top-0
|
|
5
|
+
<header className="flex items-center gap-4 p-6 lg:fixed lg:left-0 lg:top-0">
|
|
6
6
|
<h2 className="text-lg font-bold tracking-tight">
|
|
7
7
|
<Link to="/">Waku pokemon</Link>
|
|
8
8
|
</h2>
|
|
9
|
+
<a
|
|
10
|
+
href="https://github.com/dai-shi/waku/tree/main/examples/02_demo/src"
|
|
11
|
+
target="_blank"
|
|
12
|
+
rel="noreferrer"
|
|
13
|
+
className="text-sm hover:underline"
|
|
14
|
+
>
|
|
15
|
+
(source)
|
|
16
|
+
</a>
|
|
9
17
|
</header>
|
|
10
18
|
);
|
|
11
19
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export const Reload = () => {
|
|
4
|
+
const handleReload = () => {
|
|
5
|
+
window.location.reload();
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<button
|
|
10
|
+
onClick={handleReload}
|
|
11
|
+
className="inline-flex aspect-square size-16 items-center justify-center rounded-full bg-black"
|
|
12
|
+
>
|
|
13
|
+
<span className="text-sm font-bold text-white">reload</span>
|
|
14
|
+
</button>
|
|
15
|
+
);
|
|
16
|
+
};
|