Skip to content

Commit d85050c

Browse files
Added GitHub button (#359)
* Added GitHub button
1 parent 4327e59 commit d85050c

File tree

5 files changed

+49
-20
lines changed

5 files changed

+49
-20
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"repository": "@multiversx/mx-template-dapp",
88
"dependencies": {
99
"@fortawesome/fontawesome-svg-core": "6.5.1",
10+
"@fortawesome/free-brands-svg-icons": "^6.7.2",
1011
"@fortawesome/free-solid-svg-icons": "6.5.1",
1112
"@fortawesome/react-fontawesome": "0.2.0",
1213
"@multiversx/sdk-core": "14.2.6",

src/components/Layout/Header/Header.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { environment } from 'config';
44
import { getAccountProvider, useGetIsLoggedIn } from 'lib';
55
import { RouteNamesEnum } from 'localConstants';
66
import MultiversXLogo from '../../../assets/img/multiversx-logo.svg?react';
7+
import { GitHubButton } from './components/GitHubButton';
78
import { NotificationsButton } from './components/NotificationsButton';
89

910
export const Header = () => {
@@ -34,6 +35,7 @@ export const Header = () => {
3435

3536
{isLoggedIn && (
3637
<>
38+
<GitHubButton />
3739
<NotificationsButton />
3840
<Button
3941
onClick={handleLogout}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
2+
import { faGithub } from '@fortawesome/free-brands-svg-icons';
3+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4+
import { GITHUB_REPO_URL } from 'localConstants';
5+
6+
export const GitHubButton = () => {
7+
return (
8+
<a
9+
href={GITHUB_REPO_URL}
10+
rel='noopener noreferrer'
11+
target='_blank'
12+
className='inline-block rounded-lg px-3 py-2 text-center hover:no-underline my-0 text-gray-600 hover:bg-slate-100 mx-0'
13+
>
14+
<FontAwesomeIcon icon={faGithub as IconProp} />
15+
</a>
16+
);
17+
};

src/localConstants/routes/routeNames.enums.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export const GITHUB_REPO_URL = 'https://github.com/multiversx/mx-template-dapp';
2+
13
export enum RouteNamesEnum {
24
home = '/',
35
dashboard = '/dashboard',

yarn.lock

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,13 @@
527527
dependencies:
528528
"@fortawesome/fontawesome-common-types" "6.7.2"
529529

530+
"@fortawesome/free-brands-svg-icons@^6.7.2":
531+
version "6.7.2"
532+
resolved "https://registry.yarnpkg.com/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.7.2.tgz#4ebee8098f31da5446dda81edc344025eb59b27e"
533+
integrity sha512-zu0evbcRTgjKfrr77/2XX+bU+kuGfjm0LbajJHVIgBWNIDzrhpRxiCPNT8DW5AdmSsq7Mcf9D1bH0aSeSUSM+Q==
534+
dependencies:
535+
"@fortawesome/fontawesome-common-types" "6.7.2"
536+
530537
"@fortawesome/free-solid-svg-icons@6.5.1":
531538
version "6.5.1"
532539
resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.5.1.tgz#737b8d787debe88b400ab7528f47be333031274a"
@@ -1939,9 +1946,9 @@
19391946
form-data "^4.0.0"
19401947

19411948
"@types/node@*", "@types/node@>=13.7.0":
1942-
version "24.0.13"
1943-
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.0.13.tgz#93ed8c05c7b188a59760be0ce2ee3fa7ad0f83f6"
1944-
integrity sha512-Qm9OYVOFHFYg3wJoTSrz80hoec5Lia/dPp84do3X7dZvLikQvM1YpmvTBEdIr/e+U8HTkFjLHLnl78K/qjf+jQ==
1949+
version "24.0.14"
1950+
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.0.14.tgz#6e3d4fb6d858c48c69707394e1a0e08ce1ecc1bc"
1951+
integrity sha512-4zXMWD91vBLGRtHK3YbIoFMia+1nqEz72coM42C5ETjnNCa/heoj7NT1G67iAfOqMmcfhuCZ4uNpyz8EjlAejw==
19451952
dependencies:
19461953
undici-types "~7.8.0"
19471954

@@ -1956,16 +1963,16 @@
19561963
integrity sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==
19571964

19581965
"@types/node@^20.1.0", "@types/node@^20.1.1":
1959-
version "20.19.7"
1960-
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.7.tgz#1d3656e25ec91731c1cce21889e4754ebc988b4e"
1961-
integrity sha512-1GM9z6BJOv86qkPvzh2i6VW5+VVrXxCLknfmTkWEqz+6DqosiY28XUWCTmBcJ0ACzKqx/iwdIREfo1fwExIlkA==
1966+
version "20.19.8"
1967+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.8.tgz#d4a81f631d9dc5015c6e608a102c83e19d03c9db"
1968+
integrity sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw==
19621969
dependencies:
19631970
undici-types "~6.21.0"
19641971

19651972
"@types/node@^22.2.0":
1966-
version "22.16.3"
1967-
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.16.3.tgz#006f83d80e6f05f65768acc77f4a57bfac1d545f"
1968-
integrity sha512-sr4Xz74KOUeYadexo1r8imhRtlVXcs+j3XK3TcoiYk7B1t3YRVJgtaD3cwX73NYb71pmVuMLNRhJ9XKdoDB74g==
1973+
version "22.16.4"
1974+
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.16.4.tgz#00c763ad4d4e45f62d5a270c040ae1a799c7e38a"
1975+
integrity sha512-PYRhNtZdm2wH/NT2k/oAJ6/f2VD2N2Dag0lGlx2vWgMSJXGNmlce5MiTQzoWAiIJtso30mjnfQCOKVH+kAQC/g==
19691976
dependencies:
19701977
undici-types "~6.21.0"
19711978

@@ -4434,9 +4441,9 @@ ejs@^3.1.9:
44344441
jake "^10.8.5"
44354442

44364443
electron-to-chromium@^1.5.173:
4437-
version "1.5.182"
4438-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.182.tgz#4ab73104f893938acb3ab9c28d7bec170c116b3e"
4439-
integrity sha512-Lv65Btwv9W4J9pyODI6EWpdnhfvrve/us5h1WspW8B2Fb0366REPtY3hX7ounk1CkV/TBjWCEvCBBbYbmV0qCA==
4444+
version "1.5.185"
4445+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.185.tgz#b4f9189c4ef652ddf9f1bb37529e2b79f865e912"
4446+
integrity sha512-dYOZfUk57hSMPePoIQ1fZWl1Fkj+OshhEVuPacNKWzC1efe56OsHY3l/jCfiAgIICOU3VgOIdoq7ahg7r7n6MQ==
44404447

44414448
elliptic@^6.5.3, elliptic@^6.5.5:
44424449
version "6.6.1"
@@ -5584,7 +5591,7 @@ graphemer@^1.4.0:
55845591
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
55855592
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
55865593

5587-
h3@^1.15.2:
5594+
h3@^1.15.3:
55885595
version "1.15.3"
55895596
resolved "https://registry.yarnpkg.com/h3/-/h3-1.15.3.tgz#e242ec6a7692a45caed3e4a73710cede4fb8d863"
55905597
integrity sha512-z6GknHqyX0h9aQaTx22VZDf6QyZn+0Nh+Ym8O/u0SGSkyF5cuTJYKlc8MkzW3Nzf9LE1ivcpmYC3FUGpywhuUQ==
@@ -7969,9 +7976,9 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
79697976
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
79707977

79717978
picomatch@^4.0.2:
7972-
version "4.0.2"
7973-
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
7974-
integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
7979+
version "4.0.3"
7980+
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042"
7981+
integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==
79757982

79767983
pify@^2.3.0:
79777984
version "2.3.0"
@@ -9965,14 +9972,14 @@ universalify@^2.0.0:
99659972
integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
99669973

99679974
unstorage@^1.9.0:
9968-
version "1.16.0"
9969-
resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.16.0.tgz#686e23d459532e0eccc32e15eb3b415d8f309431"
9970-
integrity sha512-WQ37/H5A7LcRPWfYOrDa1Ys02xAbpPJq6q5GkO88FBXVSQzHd7+BjEwfRqyaSWCv9MbsJy058GWjjPjcJ16GGA==
9975+
version "1.16.1"
9976+
resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.16.1.tgz#b2c25d05610a64de7be61e54f61ec79c5f9ba43c"
9977+
integrity sha512-gdpZ3guLDhz+zWIlYP1UwQ259tG5T5vYRzDaHMkQ1bBY1SQPutvZnrRjTFaWUUpseErJIgAZS51h6NOcZVZiqQ==
99719978
dependencies:
99729979
anymatch "^3.1.3"
99739980
chokidar "^4.0.3"
99749981
destr "^2.0.5"
9975-
h3 "^1.15.2"
9982+
h3 "^1.15.3"
99769983
lru-cache "^10.4.3"
99779984
node-fetch-native "^1.6.6"
99789985
ofetch "^1.4.1"

0 commit comments

Comments
 (0)