Skip to content

Commit a3c74df

Browse files
FEATURE (github): Add GitHub star component and community link
1 parent 6c65bf8 commit a3c74df

File tree

4 files changed

+48
-19
lines changed

4 files changed

+48
-19
lines changed

frontend/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.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"dayjs": "^1.11.13",
1717
"react": "^19.1.0",
1818
"react-dom": "^19.1.0",
19+
"react-github-btn": "^1.4.0",
1920
"react-router": "^7.6.0",
2021
"tailwindcss": "^4.1.7"
2122
},

frontend/src/features/users/ui/AuthNavbarComponent.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import GitHubButton from 'react-github-btn';
2+
13
export function AuthNavbarComponent() {
24
return (
35
<div className="m-3 flex h-[65px] items-center p-3">
@@ -13,7 +15,7 @@ export function AuthNavbarComponent() {
1315
</div>
1416
</div>
1517

16-
<div className="mr-3 ml-auto flex gap-5">
18+
<div className="mr-3 ml-auto flex items-center gap-5">
1719
<a
1820
className="hover:opacity-80"
1921
href="https://postgresus.com/community"
@@ -23,14 +25,17 @@ export function AuthNavbarComponent() {
2325
Community
2426
</a>
2527

26-
<a
27-
className="hover:opacity-80"
28-
href="https://github.com/postgresus/postgresus"
29-
target="_blank"
30-
rel="noreferrer"
31-
>
32-
GitHub
33-
</a>
28+
<div className='mt-1'>
29+
<GitHubButton
30+
href="https://github.com/RostislavDugin/postgresus"
31+
data-icon="octicon-star"
32+
data-size="large"
33+
data-show-count="true"
34+
aria-label="Star RostislavDugin/postgresus on GitHub"
35+
>
36+
&nbsp;Star on GitHub
37+
</GitHubButton>
38+
</div>
3439
</div>
3540
</div>
3641
);

frontend/src/widgets/main/MainScreenComponent.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { DatabasesComponent } from '../../features/databases/ui/DatabasesCompone
44
import { NotifiersComponent } from '../../features/notifiers/ui/NotifiersComponent';
55
import { StoragesComponent } from '../../features/storages/StoragesComponent';
66
import { useScreenHeight } from '../../shared/hooks';
7+
import GitHubButton from 'react-github-btn';
78

89
export const MainScreenComponent = () => {
910
const screenHeight = useScreenHeight();
@@ -35,24 +36,27 @@ export const MainScreenComponent = () => {
3536
</div>
3637
</div>
3738

38-
<div className="mr-3 ml-auto flex gap-5">
39+
<div className="mr-3 ml-auto flex items-center gap-5">
3940
<a
4041
className="hover:opacity-80"
41-
href="https://postgresus.com/community"
42+
href="https://t.me/postgresus_community"
4243
target="_blank"
4344
rel="noreferrer"
4445
>
4546
Community
4647
</a>
4748

48-
<a
49-
className="hover:opacity-80"
50-
href="https://github.com/postgresus/postgresus"
51-
target="_blank"
52-
rel="noreferrer"
53-
>
54-
GitHub
55-
</a>
49+
<div className="mt-1">
50+
<GitHubButton
51+
href="https://github.com/RostislavDugin/postgresus"
52+
data-icon="octicon-star"
53+
data-size="large"
54+
data-show-count="true"
55+
aria-label="Star RostislavDugin/postgresus on GitHub"
56+
>
57+
&nbsp;Star on GitHub
58+
</GitHubButton>
59+
</div>
5660
</div>
5761
</div>
5862
{/* ===================== END NAVBAR ===================== */}

0 commit comments

Comments
 (0)