Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions components/app-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import { useTranslation } from "@/components/language-provider";
import { cn } from "@/lib/utils";
import { Icon } from "./ui/button";
import { FaGithub } from "react-icons/fa";

export function AppFooter() {
const { t, dir } = useTranslation();
Expand Down Expand Up @@ -55,6 +57,19 @@ export function AppFooter() {
>
{t("footer.note")}
</p>
<a href="https://github.com/O2sa/DevImpact"
target="_blank"
rel="noopener noreferrer"
aria-label="GitHub Repository">
<Icon
type="button"
variant="ghost"
size="sm"
className="flex items-center gap-2"
>
<FaGithub className="text-black dark:text-white" />
</Icon>
</a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion components/app-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export function AppHeader() {
</div>
</header>
);
}
}
45 changes: 33 additions & 12 deletions components/theme-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import { Button } from "./ui/button";
import { Button, Icon } from "./ui/button";
import { useSyncExternalStore } from "react";
import { useTranslation } from "./language-provider";
import { FaGithub } from "react-icons/fa";

const emptySubscribe = () => () => {};
const emptySubscribe = () => () => { };

export function ThemeToggle() {
const { t } = useTranslation();
Expand All @@ -32,15 +33,35 @@ export function ThemeToggle() {
};

return (
<Button
type="button"
variant="ghost"
size="sm"
onClick={handleToggle}
className="flex items-center gap-2"
aria-label={t("theme.toggle")}
>
{mounted && current === "dark" ? <Sun size={16} /> : <Moon size={16} />}
</Button>
<div className="flex items-center">
<Button
type="button"
variant="ghost"
size="sm"
onClick={handleToggle}
className="flex items-center gap-2"
aria-label={t("theme.toggle")}
>
{mounted && current === "dark" ? <Sun size={16} /> : <Moon size={16} />}
</Button>
<a href="https://github.com/O2sa/DevImpact"
target="_blank"
rel="noopener noreferrer"
aria-label="GitHub Repository">
<Icon
type="button"
variant="ghost"
size="sm"
className="flex items-center gap-2"
>
<FaGithub className="text-black dark:text-white" />
</Icon>
</a>


</div>



);
}
9 changes: 9 additions & 0 deletions components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ export function Button({ className, variant, size, ...props }: ButtonProps) {
/>
);
}

export function Icon({ className, variant, size, ...props }: ButtonProps) {
return (
<button
className={cn(buttonVariants({ variant, size }), className)}
{...props}
/>
);
}
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"radix-ui": "^1.4.3",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-icons": "^5.6.0",
"recharts": "^2.12.7",
"tailwind-merge": "^2.5.3"
},
Expand Down
40 changes: 12 additions & 28 deletions pnpm-lock.yaml

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

Loading