Skip to content

Commit 559e1f3

Browse files
committed
paths fixing
1 parent 91fe204 commit 559e1f3

6 files changed

Lines changed: 9 additions & 8 deletions

File tree

0 Bytes
Binary file not shown.

src/client/AppComponents/Hero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const IconLink = ({
3434
</Link>
3535
);
3636

37-
const {BASE_URL} = getConfig();
37+
const {VITE_BASE_URL} = getConfig();
3838

3939
interface HeroBgContainerProps {
4040
className?: string;
@@ -45,7 +45,7 @@ const HeroBgContainer: React.FC<HeroBgContainerProps> = ({
4545
className,
4646
children,
4747
}) => {
48-
const imagePath = `${BASE_URL}/images/portrait.webp`;
48+
const imagePath = `${VITE_BASE_URL}/images/portrait.webp`;
4949
return (
5050
<div
5151
className={`relative bg-clip-border bg-no-repeat bg-cover bg-[calc(50%+30px)_center] xl:bg-center ${className}`}

src/client/AppComponents/Menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import getConfig from "../Components/getConfig";
1010
import {BiWrench} from "react-icons/bi";
1111
import {pdfPath} from "../contentDb";
1212

13-
const {BASE_URL} = getConfig();
13+
const {BASE_URL, VITE_BASE_URL} = getConfig();
1414

1515
const Icon = ({
1616
Cmp,
@@ -56,7 +56,7 @@ const Menu = () => {
5656
<Icon Cmp={PiGraduationCap} isActive={isActive("/education")} />
5757
</Link>
5858
</div>
59-
<a href={pdfPath} target="_blank">
59+
<a href={`${VITE_BASE_URL}${pdfPath}`} target="_blank">
6060
<Icon Cmp={MdOutlineFileDownload} />
6161
</a>
6262
</div>

src/client/AppComponents/Metadata.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import {fullName} from "../contentDb";
55
const {BASE_URL, VITE_APP_NAME} = getConfig();
66

77
const Metadata = () => {
8-
if (!BASE_URL) throw new Error("root: BASE_URL is undefined");
8+
if (BASE_URL === undefined)
9+
throw new Error("Metadata: BASE_URL is undefined");
910
if (!VITE_APP_NAME) throw new Error("root: VITE_APP_NAME is undefined");
1011

1112
return (

src/client/Components/WrapRoute.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import Hero from "../AppComponents/Hero";
77
import getConfig from "./getConfig";
88
import useScrollToTop from "./useScrollToTop";
99

10-
const {BASE_URL} = getConfig();
10+
const {VITE_BASE_URL} = getConfig();
1111

1212
const WrapRoute: React.FC = () => {
1313
useTrackPageViewsInGA();
1414
const scrollableRef = useRef<HTMLDivElement>(null);
1515

1616
useScrollToTop(scrollableRef);
17-
const imgPath = `${BASE_URL}/images/bg.webp`;
17+
const imgPath = `${VITE_BASE_URL}/images/bg.webp`;
1818

1919
return (
2020
<BgContainer imagePath={imgPath} className="flex justify-center bg-[300%]">

src/client/contentDb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const linkedIn =
5454
"https://www.linkedin.com/in/hanna-gaudasinska-zapasnik";
5555
export const github = "https://github.com/HGZdev";
5656

57-
export const pdfPath = "public/docs/Hanna_Gaudasinska_Zapasnik_CV.pdf";
57+
export const pdfPath = "/docs/Hanna_Gaudasinska_Zapasnik_CV.pdf";
5858

5959
export const aboutText = (
6060
<>

0 commit comments

Comments
 (0)