Skip to content

Commit a3e8526

Browse files
committed
github banner
1 parent 11e563d commit a3e8526

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

package-lock.json

Lines changed: 19 additions & 0 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"next-themes": "^0.4.4",
1717
"react": "^18.3.1",
1818
"react-dom": "^18.3.1",
19+
"react-github-btn": "^1.4.0",
1920
"react-icons": "^5.4.0"
2021
},
2122
"devDependencies": {

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Toaster } from "@/components/ui/toaster";
44
import { useAuth } from "./context/Auth";
55
import ChatComponent from "./components/chat";
66
import Login from "./components/login";
7+
import Banner from "./components/banner";
78

89
function App() {
910
const { isAuthenticated, isLoading } = useAuth();
@@ -28,6 +29,7 @@ function App() {
2829
</Box>
2930
{isAuthenticated ? <ChatComponent /> : <Login />}
3031
<Toaster />
32+
<Banner />
3133
</Center>
3234
);
3335
}

src/components/banner/index.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Box, Stack } from "@chakra-ui/react";
2+
import GitHubButton from "react-github-btn";
3+
4+
const Banner = () => {
5+
return (
6+
<Box p={4} pos="absolute" top="0" left="0">
7+
<Stack align="flex-start">
8+
<GitHubButton
9+
href="https://github.com/khyrulAlam/react-firebase-chat"
10+
data-color-scheme="no-preference: dark; light: light; dark: dark;"
11+
data-size="large"
12+
data-show-count="true"
13+
aria-label="Star khyrulAlam/react-firebase-chat on GitHub"
14+
>
15+
Star
16+
</GitHubButton>
17+
<GitHubButton
18+
href="https://github.com/khyrulAlam/react-firebase-chat/fork"
19+
data-color-scheme="no-preference: dark; light: light; dark: dark;"
20+
data-size="large"
21+
data-show-count="true"
22+
aria-label="Fork khyrulAlam/react-firebase-chat on GitHub"
23+
>
24+
Fork
25+
</GitHubButton>
26+
</Stack>
27+
</Box>
28+
);
29+
};
30+
31+
export default Banner;

0 commit comments

Comments
 (0)