Skip to content

Commit dff8c8e

Browse files
Merge branch 'main' into use-solidbase-package-syntax
2 parents 4fe94d1 + 26e79a8 commit dff8c8e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

app.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export default defineConfig(
7676
cursorColor: "var(--twoslash-cursor)",
7777
},
7878
},
79+
twoSlash: false,
7980
},
8081
toc: {
8182
minDepth: 2,

src/ui/layout/hero.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, Index, Match, Switch, createMemo } from "solid-js";
22
import { ButtonLink } from "../button-link";
33
import { snippetLines } from "./hero-code-snippet";
4-
import { useLocation, useMatch } from "@solidjs/router";
4+
import { useMatch } from "@solidjs/router";
55
import { useI18n } from "~/i18n/i18n-context";
66
import RenderedCode from "./hero-code-snippet";
77

@@ -16,21 +16,25 @@ const TrafficLightsIcon: Component<{ class: string }> = (props) => {
1616
};
1717

1818
export const Hero: Component = () => {
19-
const location = useLocation();
2019
const isStart = useMatch(() => "/solid-start/*");
2120
const isRouter = useMatch(() => "/solid-router/*");
2221
const isMeta = useMatch(() => "/solid-meta/*");
2322

2423
const buttonHref = createMemo(() => {
25-
if (location.pathname === "/solid-start")
24+
if (isStart()) {
2625
return "solid-start/getting-started";
27-
if (location.pathname === "/solid-router")
26+
}
27+
if (isRouter()) {
2828
return "solid-router/getting-started/installation-and-setup";
29-
if (location.pathname === "/solid-meta")
29+
}
30+
if (isMeta()) {
3031
return "solid-meta/getting-started/installation-and-setup";
32+
}
3133
return "/quick-start";
3234
});
35+
3336
const i18n = useI18n();
37+
3438
return (
3539
<div class="overflow-hidden bg-sky-100/80 border border-sky-200 dark:border-none dark:bg-slate-900 mb-10 ">
3640
<div class="py-10 sm:px-2 lg:relative">

0 commit comments

Comments
 (0)