Skip to content

Commit 4b750a2

Browse files
authored
Merge pull request #163 from uidotdev/tyler
Remove trailing slash, logs, and update footer.
2 parents 1445535 + 32461e0 commit 4b750a2

File tree

8 files changed

+13
-27
lines changed

8 files changed

+13
-27
lines changed

index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ export function useIdle(ms = 1000 * 60) {
445445
};
446446

447447
const handleEvent = throttle((e) => {
448-
console.log("EVENT");
449448
setIdle(false);
450449

451450
window.clearTimeout(timeoutId);
@@ -784,8 +783,6 @@ export function useMouse() {
784783
};
785784
}, []);
786785

787-
console.log({ state });
788-
789786
return [state, ref];
790787
}
791788

@@ -1150,7 +1147,6 @@ export function useSpeech(text, options) {
11501147
utterance.onpause = handlePause;
11511148
utterance.onresume = handlePlay;
11521149
utterance.onend = handleEnd;
1153-
console.log("ayy", text);
11541150
window.speechSynthesis.speak(utterance);
11551151
}, [text]);
11561152

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uidotdev/usehooks",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "A collection of 50 RSC safe React hooks",
55
"type": "module",
66
"repository": "uidotdev/usehooks",

usehooks.com/astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import sitemap from "@astrojs/sitemap";
1313
// https://astro.build/config
1414
export default defineConfig({
1515
site: "https://usehooks.com",
16+
trailingSlash: "never",
1617
integrations: [react(), tailwind(), mdx(), sitemap()],
1718
output: "static",
1819
// adapter: vercel(),

usehooks.com/src/components/search/HookCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function HookCard({
99
}) {
1010
return (
1111
<li className={styles.hook}>
12-
<a href={`/${name.toLowerCase()}/`}>
12+
<a href={`/${name.toLowerCase()}`}>
1313
<h3 className={styles["card-title"]}>{name}</h3>
1414
<p className={styles["card-description"]}>{tagline}</p>
1515
<svg

usehooks.com/src/sections/Footer.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<a href="https://ui.dev" class="byline">by ui.dev</a>
99
<nav>
1010
<a href="https://github.com/uidotdev/usehooks">Fork on GitHub</a>
11-
<a href="https://www.npmjs.com/package/@uidotdev/usehooks">Install with npm</a>
12-
<a href="https://react.gg">Learn with react.gg</a>
11+
<a href="https://bytes.dev">JavaScript Newsletter</a>
12+
<a href="https://react.gg">Learn React</a>
1313
</nav>
1414
</footer>
1515

usehooks.com/src/sections/HomeHero.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ const hooksMarquee2 = (await getCollection('hooks')).slice(25,50);
1414
<ul class="marquee-content">
1515
{hooksMarquee1.map(hook => (
1616
<li>
17-
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
17+
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
1818
</li>
1919
))}
2020
</ul>
2121
<ul class="marquee-content">
2222
{hooksMarquee1.map(hook => (
2323
<li>
24-
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
24+
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
2525
</li>
2626
))}
2727
</ul>
@@ -30,14 +30,14 @@ const hooksMarquee2 = (await getCollection('hooks')).slice(25,50);
3030
<ul class="marquee-content">
3131
{hooksMarquee2.map(hook => (
3232
<li>
33-
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
33+
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
3434
</li>
3535
))}
3636
</ul>
3737
<ul class="marquee-content">
3838
{hooksMarquee2.map(hook => (
3939
<li>
40-
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
40+
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
4141
</li>
4242
))}
4343
</ul>

usehooks.com/vercel.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"trailingSlash": false,
23
"rewrites": [
34
{
45
"source": "/stats/js/script.js",
@@ -16,7 +17,7 @@
1617
},
1718
{
1819
"source": "/useOnScreen",
19-
"destination": "/usetntersectionobserver"
20+
"destination": "/useintersectionobserver"
2021
},
2122
{
2223
"source": "/useWhyDidYouUpdate",
@@ -46,10 +47,6 @@
4647
"source": "/useLockBodyScroll",
4748
"destination": "/uselockbodyscroll"
4849
},
49-
{
50-
"source": "/useThrottle",
51-
"destination": "/usethrottle"
52-
},
5350
{
5451
"source": "/useToggle",
5552
"destination": "/usetoggle"
@@ -122,17 +119,9 @@
122119
"source": "/useDarkMode",
123120
"destination": "/"
124121
},
125-
{
126-
"source": "/useRouter",
127-
"destination": "/"
128-
},
129122
{
130123
"source": "/useAsync",
131124
"destination": "/"
132-
},
133-
{
134-
"source": "/useAuth",
135-
"destination": "/"
136125
}
137126
]
138127
}

0 commit comments

Comments
 (0)