Skip to content

Commit

Permalink
Merge pull request #163 from uidotdev/tyler
Browse files Browse the repository at this point in the history
Remove trailing slash, logs, and update footer.
  • Loading branch information
benadam11 committed May 30, 2023
2 parents 1445535 + 32461e0 commit 4b750a2
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 27 deletions.
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ export function useIdle(ms = 1000 * 60) {
};

const handleEvent = throttle((e) => {
console.log("EVENT");
setIdle(false);

window.clearTimeout(timeoutId);
Expand Down Expand Up @@ -784,8 +783,6 @@ export function useMouse() {
};
}, []);

console.log({ state });

return [state, ref];
}

Expand Down Expand Up @@ -1150,7 +1147,6 @@ export function useSpeech(text, options) {
utterance.onpause = handlePause;
utterance.onresume = handlePlay;
utterance.onend = handleEnd;
console.log("ayy", text);
window.speechSynthesis.speak(utterance);
}, [text]);

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uidotdev/usehooks",
"version": "0.0.4",
"version": "0.0.5",
"description": "A collection of 50 RSC safe React hooks",
"type": "module",
"repository": "uidotdev/usehooks",
Expand Down
1 change: 1 addition & 0 deletions usehooks.com/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import sitemap from "@astrojs/sitemap";
// https://astro.build/config
export default defineConfig({
site: "https://usehooks.com",
trailingSlash: "never",
integrations: [react(), tailwind(), mdx(), sitemap()],
output: "static",
// adapter: vercel(),
Expand Down
2 changes: 1 addition & 1 deletion usehooks.com/src/components/search/HookCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function HookCard({
}) {
return (
<li className={styles.hook}>
<a href={`/${name.toLowerCase()}/`}>
<a href={`/${name.toLowerCase()}`}>
<h3 className={styles["card-title"]}>{name}</h3>
<p className={styles["card-description"]}>{tagline}</p>
<svg
Expand Down
4 changes: 2 additions & 2 deletions usehooks.com/src/sections/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<a href="https://ui.dev" class="byline">by ui.dev</a>
<nav>
<a href="https://github.com/uidotdev/usehooks">Fork on GitHub</a>
<a href="https://www.npmjs.com/package/@uidotdev/usehooks">Install with npm</a>
<a href="https://react.gg">Learn with react.gg</a>
<a href="https://bytes.dev">JavaScript Newsletter</a>
<a href="https://react.gg">Learn React</a>
</nav>
</footer>

Expand Down
8 changes: 4 additions & 4 deletions usehooks.com/src/sections/HomeHero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const hooksMarquee2 = (await getCollection('hooks')).slice(25,50);
<ul class="marquee-content">
{hooksMarquee1.map(hook => (
<li>
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
</li>
))}
</ul>
<ul class="marquee-content">
{hooksMarquee1.map(hook => (
<li>
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
</li>
))}
</ul>
Expand All @@ -30,14 +30,14 @@ const hooksMarquee2 = (await getCollection('hooks')).slice(25,50);
<ul class="marquee-content">
{hooksMarquee2.map(hook => (
<li>
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
</li>
))}
</ul>
<ul class="marquee-content">
{hooksMarquee2.map(hook => (
<li>
<a href={`/${hook.slug}/`} tabindex="-1">{hook.data.name}</a>
<a href={`/${hook.slug}`} tabindex="-1">{hook.data.name}</a>
</li>
))}
</ul>
Expand Down
15 changes: 2 additions & 13 deletions usehooks.com/vercel.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"trailingSlash": false,
"rewrites": [
{
"source": "/stats/js/script.js",
Expand All @@ -16,7 +17,7 @@
},
{
"source": "/useOnScreen",
"destination": "/usetntersectionobserver"
"destination": "/useintersectionobserver"
},
{
"source": "/useWhyDidYouUpdate",
Expand Down Expand Up @@ -46,10 +47,6 @@
"source": "/useLockBodyScroll",
"destination": "/uselockbodyscroll"
},
{
"source": "/useThrottle",
"destination": "/usethrottle"
},
{
"source": "/useToggle",
"destination": "/usetoggle"
Expand Down Expand Up @@ -122,17 +119,9 @@
"source": "/useDarkMode",
"destination": "/"
},
{
"source": "/useRouter",
"destination": "/"
},
{
"source": "/useAsync",
"destination": "/"
},
{
"source": "/useAuth",
"destination": "/"
}
]
}

0 comments on commit 4b750a2

Please sign in to comment.