Skip to content

Commit 7f5ce74

Browse files
committed
try fix netflify build again
1 parent f7a2ee3 commit 7f5ce74

File tree

5 files changed

+38
-57
lines changed

5 files changed

+38
-57
lines changed

packages/i18n/dev/index.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
import { Component, createResource, createSignal, Show, Suspense, useTransition } from "solid-js";
2-
import type * as en from "./en.js";
32
import * as i18n from "../src/index.js";
3+
import * as en from "./en.js"
4+
import * as es from "./es.js"
5+
import * as fr from "./fr.js"
6+
import { isServer } from "solid-js/web";
47

58
export type Locale = "en" | "fr" | "es";
69
export type RawDictionary = typeof en.dict;
710
export type Dictionary = i18n.Flatten<RawDictionary>;
11+
const locales = { en, es, fr };
812

913
async function fetchDictionary(locale: Locale): Promise<Dictionary> {
1014
await new Promise(r => setTimeout(r, 600)); // to see the transition
1115

12-
const dict: RawDictionary = (await import(`./${locale}.ts`)).dict;
16+
const dict: RawDictionary = locales[locale].dict;
1317
return i18n.flatten(dict);
1418
}
1519

1620
const App: Component = () => {
21+
if (isServer) return;
1722
const [locale, setLocale] = createSignal<Locale>("en");
1823
const [name, setName] = createSignal("User");
1924

packages/input-mask/dev/index.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ import {
77
maskArrayToFn,
88
Selection,
99
} from "../src/index.js";
10+
import { isServer } from "solid-js/web";
1011

1112
const App: Component = () => {
13+
if (isServer) return;
14+
1215
// ISO Date
1316
const isoDateHandler = createMaskPattern(createInputMask("9999-99-99"), () => "YYYY-MM-DD");
1417

packages/refs/dev/index.tsx

+27-19
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
1-
import { Component, lazy } from "solid-js";
2-
3-
import { Router, Routes, Route, Link } from "solid-app-router";
4-
5-
const Key = lazy(() => import("./key"));
1+
import { Rerun } from "../../keyed/src/index.js";
2+
import { Component, createSignal } from "solid-js";
3+
import { Transition } from "solid-transition-group";
64

75
const App: Component = () => {
6+
const [count, setCount] = createSignal(0);
7+
88
return (
9-
<Router>
10-
<nav class="fixed left-2 top-2 flex space-x-4">
11-
<a class="text-yellow-400" href="/">
12-
reload
13-
</a>
14-
<Link class="text-yellow-400" href="/key">
15-
/key
16-
</Link>
17-
</nav>
18-
<div class="box-border min-h-screen w-full space-y-4 bg-gray-800 p-24 text-white">
19-
<Routes>
20-
<Route path="/key" element={<Key />} />
21-
</Routes>
9+
<>
10+
<div class="wrapper-h">
11+
<Transition
12+
onEnter={(el, done) => {
13+
el.animate([{ opacity: 0 }, { opacity: 1 }], {
14+
duration: 600,
15+
}).finished.then(done);
16+
}}
17+
onExit={(el, done) => {
18+
el.animate([{ opacity: 1 }, { opacity: 0 }], {
19+
duration: 600,
20+
}).finished.then(done);
21+
}}
22+
mode="outin"
23+
>
24+
<Rerun on={count}>
25+
<button class="btn" onClick={() => setCount(p => ++p)}>
26+
{count()}
27+
</button>
28+
</Rerun>
29+
</Transition>
2230
</div>
23-
</Router>
31+
</>
2432
);
2533
};
2634
export default App;

packages/refs/dev/key.tsx

-34
This file was deleted.

packages/refs/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@
5959
"@solid-primitives/utils": "workspace:^"
6060
},
6161
"devDependencies": {
62-
"solid-app-router": "^0.4.2",
6362
"solid-js": "^1.8.7",
6463
"solid-transition-group": "^0.2.3"
6564
},
6665
"peerDependencies": {
6766
"solid-js": "^1.6.12"
6867
}
69-
}
68+
}

0 commit comments

Comments
 (0)