Skip to content

Commit 1ac8c8d

Browse files
committed
chore: icon
1 parent e437038 commit 1ac8c8d

File tree

9 files changed

+37
-49
lines changed

9 files changed

+37
-49
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
},
2323
"devDependencies": {
2424
"@debbl/eslint-config": "^0.0.53",
25+
"@iconify/icons-carbon": "^1.2.20",
26+
"@iconify/react": "^4.1.1",
2527
"@types/node": "18.15.10",
2628
"@types/react": "18.0.30",
2729
"@types/react-dom": "18.0.11",

pnpm-lock.yaml

+25-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/next.svg

-1
This file was deleted.

public/thirteen.svg

-1
This file was deleted.

public/vercel.svg

-1
This file was deleted.

src/assets/images/github-dark.svg

-15
This file was deleted.

src/assets/images/github.svg

-15
This file was deleted.

src/components/GitHubInfo.tsx

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
import Image from "next/image";
2-
import GithubIcon from "~/assets/images/github.svg";
3-
import useMainStore from "~/store/useMainStore";
4-
import GithubIconDark from "~/assets/images/github-dark.svg";
1+
import { Icon } from "@iconify/react";
2+
import logoGithub from "@iconify/icons-carbon/logo-github";
53

64
function GitHubInfo() {
7-
const theme = useMainStore((s) => (s.theme === "vs-dark" ? "dark" : "light"));
85
return (
9-
<div className="ml-8 flex h-[16px] w-[16px] justify-center">
6+
<div className="ml-8 flex h-[18px] w-[18px] justify-center">
107
<a
118
href="https://github.com/Debbl/code-diff"
129
target="_blank"
1310
rel="noreferrer"
1411
>
15-
<Image
16-
src={theme === "light" ? GithubIcon : GithubIconDark}
17-
alt="https://github.com/Debbl/code-diff"
18-
unoptimized
19-
></Image>
12+
<Icon icon={logoGithub} className="h-[18px] w-[18px]" />
2013
</a>
2114
</div>
2215
);

src/pages/index.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { DiffOnMount, Monaco } from "@monaco-editor/react";
22
import { DiffEditor } from "@monaco-editor/react";
33
import Head from "next/head";
4-
import nextConfig from "../../next.config";
4+
import { basePath } from "../../next.config";
55
import useMainStore from "~/store/useMainStore";
66
import Header from "~/components/Header";
77
import useTheme from "~/hooks/useTheme";
@@ -31,13 +31,15 @@ export default function Index() {
3131
<title>code-diff</title>
3232
<link
3333
rel="shortcut icon"
34-
href={`${nextConfig.basePath}/logo.svg`}
34+
href={`${basePath}/logo.svg`}
3535
type="image/x-icon"
3636
/>
3737
</Head>
38-
<div className="flex h-screen flex-col items-center">
39-
<h1 className="my-2 text-center text-xl font-medium">Code Diff</h1>
4038

39+
<div className="flex h-screen flex-col items-center">
40+
<h1 className="my-2 cursor-pointer text-center text-xl font-medium">
41+
<a href={basePath}>Code Diff</a>
42+
</h1>
4143
<Header />
4244

4345
<main className="h-full w-full">

0 commit comments

Comments
 (0)