Skip to content

Commit 0ef3bc7

Browse files
committed
Add GH repo user setting
1 parent a2c0e4b commit 0ef3bc7

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Gist configuration URL
22
VITE_CONFIG_GIST_URL=your_gist_url_here
33

4+
# GitHub repository URL
5+
VITE_GITHUB_REPO=https://github.com/yourusername/terminal-portfolio
6+
47
# Node environment
58
NODE_ENV=development
69

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ services:
1515
environment:
1616
- NODE_ENV=development
1717
- VITE_CONFIG_GIST_URL=${VITE_CONFIG_GIST_URL}
18+
- VITE_GITHUB_REPO=${VITE_GITHUB_REPO}
1819
profiles: ["dev"]
1920
# Enable hot reload
2021
develop:
@@ -34,6 +35,7 @@ services:
3435
environment:
3536
- NODE_ENV=production
3637
- VITE_CONFIG_GIST_URL=${VITE_CONFIG_GIST_URL}
38+
- VITE_GITHUB_REPO=${VITE_GITHUB_REPO}
3739
profiles: ["prod"]
3840
restart: unless-stopped
3941

src/components/commands/Welcome.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import {
2-
Cmd,
3-
HeroContainer,
4-
Link,
5-
Seperator,
6-
} from "../styles/Welcome.styled";
7-
import { useConfig } from "../../ConfigContext";
1+
import { Cmd, HeroContainer, Link, Seperator } from "../styles/Welcome.styled";
82

93
const Welcome: React.FC = () => {
10-
const { githubRepo } = useConfig().personal;
114
return (
125
<HeroContainer data-testid="welcome">
136
<div className="info-section">
147
<Seperator>----</Seperator>
158
<div>
169
This project's source code can be found in this project's{" "}
17-
<Link href={githubRepo}>GitHub repo</Link>
10+
<Link
11+
href={
12+
import.meta.env.VITE_GITHUB_REPO ||
13+
"https://github.com/yourusername/terminal-portfolio"
14+
}
15+
>
16+
GitHub repo
17+
</Link>
1818
.
1919
</div>
2020
<Seperator>----</Seperator>

0 commit comments

Comments
 (0)