Skip to content

Commit 4e6f571

Browse files
committed
v1.1.1
1 parent 6febe77 commit 4e6f571

8 files changed

Lines changed: 91 additions & 21 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stack-builder",
33
"private": true,
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Buildpage from "./pages/Builder";
33
import LandingPage from "./pages/LandingPage";
44
import i18n from "./i18n";
55
import { useEffect } from "react";
6+
import NotFound from "./pages/NotFound";
67

78
function LangLayout() {
89
const { lang } = useParams();
@@ -33,6 +34,7 @@ function LangLayout() {
3334
<Routes>
3435
<Route index element={<LandingPage />} />
3536
<Route path="builder" element={<Buildpage />} />
37+
<Route path="*" element={<NotFound />} />
3638
</Routes>
3739
);
3840
}

src/components/command-step.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ export default function CommandStep({ step, index }: CommandStepProps) {
3535
{step.label}
3636
</span>
3737
</div>
38-
<Button variant="ghost" size={"icon-sm"} onClick={handleCopy}>
38+
<Button
39+
className="cursor-pointer"
40+
variant="ghost"
41+
size={"icon-sm"}
42+
onClick={handleCopy}
43+
>
3944
{copied ? (
4045
<Check className="text-foreground size-3.5" />
4146
) : (

src/components/mode-toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function ModeToggle() {
1515
return (
1616
<DropdownMenu>
1717
<DropdownMenuTrigger asChild>
18-
<Button variant="outline" size="icon">
18+
<Button className="cursor-pointer" variant="outline" size="icon">
1919
<Sun className="h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" />
2020
<Moon className="absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" />
2121
<span className="sr-only">Toggle theme</span>

src/pages/Builder.tsx

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,10 @@ function ShareDialog({ selections }: { selections: Set<string> }) {
502502
return (
503503
<Dialog>
504504
<DialogTrigger asChild>
505-
<Button variant="outline" className="w-full gap-1.5 bg-transparent">
505+
<Button
506+
variant="outline"
507+
className="w-full cursor-pointer gap-1.5 bg-transparent"
508+
>
506509
<Share2 className="size-3.5" />
507510
{t("share")}
508511
</Button>
@@ -554,7 +557,7 @@ function ShareDialog({ selections }: { selections: Set<string> }) {
554557
</label>
555558
<div className="flex gap-2">
556559
<Input type="text" value={shareUrl} readOnly />
557-
<Button onClick={handleCopy}>
560+
<Button onClick={handleCopy} className="cursor-pointer">
558561
{copied ? (
559562
<>
560563
<Check className="h-4 w-4" />
@@ -775,7 +778,12 @@ export default function BuilderPage() {
775778
<div className="flex items-center gap-2">
776779
<Tooltip disableHoverableContent>
777780
<TooltipTrigger asChild>
778-
<Button variant="ghost" size="icon" onClick={handleReset}>
781+
<Button
782+
variant="ghost"
783+
size="icon"
784+
className="cursor-pointer"
785+
onClick={handleReset}
786+
>
779787
<RotateCcw className="size-4" />
780788
</Button>
781789
</TooltipTrigger>
@@ -785,7 +793,12 @@ export default function BuilderPage() {
785793
</Tooltip>
786794
<Tooltip disableHoverableContent>
787795
<TooltipTrigger asChild>
788-
<Button variant="ghost" size="icon" onClick={handleRandom}>
796+
<Button
797+
variant="ghost"
798+
size="icon"
799+
className="cursor-pointer"
800+
onClick={handleRandom}
801+
>
789802
<Shuffle className="size-4" />
790803
</Button>
791804
</TooltipTrigger>
@@ -795,7 +808,10 @@ export default function BuilderPage() {
795808
</Tooltip>
796809
<DropdownMenu>
797810
<DropdownMenuTrigger asChild>
798-
<Button variant="outline" className="gap-1 bg-transparent">
811+
<Button
812+
variant="outline"
813+
className="cursor-pointer gap-1 bg-transparent"
814+
>
799815
{t("presets")}
800816
<ChevronDown className="size-3" />
801817
</Button>
@@ -837,7 +853,12 @@ export default function BuilderPage() {
837853
<span className="text-muted-foreground text-xs font-medium">
838854
{t("command_label")}
839855
</span>
840-
<Button variant="ghost" size="icon-xs" onClick={handleCopy}>
856+
<Button
857+
className="cursor-pointer"
858+
variant="ghost"
859+
size="icon-xs"
860+
onClick={handleCopy}
861+
>
841862
{copied ? (
842863
<Check className="text-foreground size-3" />
843864
) : (

src/pages/LandingPage.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,41 +135,55 @@ export default function LandingPage() {
135135
const [menu, setMenu] = useState(false);
136136
const [visible, setVisible] = useState(false);
137137

138+
function toggleNav() {
139+
if (window.innerWidth <= 640) {
140+
setMenu(!menu);
141+
setTimeout(() => {
142+
setVisible(!visible);
143+
}, 700);
144+
} else return;
145+
}
146+
138147
return (
139148
<>
140149
<header
141150
className={`border-border/50 bg-background/80 fixed top-0 z-10 w-screen border-b backdrop-blur-md max-sm:transition-[height] max-sm:duration-1000 ${menu ? `max-sm:h-66` : `max-sm:h-16.5`}`}
142151
>
143152
<div className="relative mx-auto flex h-16 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8">
144-
<div className="flex items-center gap-2">
145-
<img
146-
className="size-8 dark:invert"
147-
src="/Logo_dark.svg"
148-
alt="Logo"
149-
/>
150-
<span className="text-lg font-semibold tracking-tight max-sm:leading-5.5">
151-
Stack Builder
153+
<HashLink smooth to={"#"}>
154+
<span className="flex items-center gap-2">
155+
<img
156+
className="size-8 dark:invert"
157+
src="/Logo_dark.svg"
158+
alt="Logo"
159+
/>
160+
<span className="text-lg font-semibold tracking-tight max-sm:text-base max-sm:leading-5">
161+
Stack Builder
162+
</span>
152163
</span>
153-
</div>
164+
</HashLink>
154165
<nav
155166
className={`absolute left-1/2 flex -translate-x-1/2 items-center gap-6 max-sm:top-17 max-sm:w-full max-sm:translate-y-0 max-sm:flex-col max-sm:gap-4 max-sm:p-4 max-sm:transition-all ${menu ? `` : `max-sm:opacity-0`} ${visible ? `` : `max-sm:hidden`}`}
156167
>
157168
<HashLink
158169
to="#features"
170+
onClick={toggleNav}
159171
smooth
160172
className="text-muted-foreground hover:text-foreground text-sm transition-colors"
161173
>
162174
{t("features")}
163175
</HashLink>
164176
<HashLink
165177
to="#presets"
178+
onClick={toggleNav}
166179
smooth
167180
className="text-muted-foreground hover:text-foreground text-sm transition-colors"
168181
>
169182
{t("presets")}
170183
</HashLink>
171184
<a
172185
href="https://github.com/FelipeRicard0/stack-builder"
186+
onClick={toggleNav}
173187
target="_blank"
174188
rel="noopener noreferrer"
175189
className="text-muted-foreground hover:text-foreground text-sm transition-colors"
@@ -243,7 +257,7 @@ export default function LandingPage() {
243257
}
244258
>
245259
<Link to="builder">
246-
<Button className="group" size={"lg"}>
260+
<Button className="group cursor-pointer" size={"lg"}>
247261
{t("open_builder")}
248262
<ArrowRight className="ml-0.5 size-4 transition-transform group-hover:translate-x-1" />
249263
</Button>
@@ -354,7 +368,7 @@ export default function LandingPage() {
354368
<p className="text-muted-foreground mt-4">{t("join_thousands")}</p>
355369
<div className="mt-8 flex flex-col items-center justify-center gap-4 sm:flex-row">
356370
<Link to="builder">
357-
<Button size="lg">
371+
<Button size="lg" className="cursor-pointer">
358372
{t("launch_builder")}
359373
<ArrowRight />
360374
</Button>
@@ -364,7 +378,7 @@ export default function LandingPage() {
364378
target="_blank"
365379
rel="noopener noreferrer"
366380
>
367-
<Button variant="outline" size="lg">
381+
<Button variant="outline" className="cursor-pointer" size="lg">
368382
<Github />
369383
{t("view_on_github")}
370384
</Button>

src/pages/NotFound.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Link, useLocation } from "react-router-dom";
2+
import { useEffect } from "react";
3+
4+
const NotFound = () => {
5+
const location = useLocation();
6+
7+
useEffect(() => {
8+
console.error(
9+
"404 Error: User attempted to access non-existent route:",
10+
location.pathname,
11+
);
12+
}, [location.pathname]);
13+
14+
return (
15+
<div className="flex min-h-screen flex-col items-center justify-center">
16+
<h1 className="mb-4 text-4xl font-bold">404</h1>
17+
<p className="text-muted-foreground mb-4 text-xl">Oops! Page not found</p>
18+
<Link to="/" className="underline">
19+
Return to Home
20+
</Link>
21+
</div>
22+
);
23+
};
24+
25+
export default NotFound;

vercel.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
3+
}

0 commit comments

Comments
 (0)