Skip to content

Commit 3ac72fe

Browse files
committed
Version 1.0.0
1 parent 8c43826 commit 3ac72fe

File tree

17 files changed

+69
-40
lines changed

17 files changed

+69
-40
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
aws-region: ${{ env.AWS_REGION }}
2222
- name: Install dependencies and build
2323
run: |
24+
VITE_CV_PATH=${{secrets.VITE_CV_PATH}}
2425
npm install
2526
npm run build
2627
- name: Deploy static site to S3 bucket

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Logs
2+
.env
23
logs
34
*.log
45
npm-debug.log*

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ This repository contains code for Portfolio website created using React.
1212

1313
## Demo 🎥
1414

15-
Check live demonstration <a href="https://main.d235v2ghujwmr7.amplifyapp.com/"><strong>here</strong></a>
15+
Check live demonstration <a href="https://portfolio.enikosoft.com/"><strong>here</strong></a>
1616

1717

1818
## Images of The Portfolio Website:
1919
![React Portfolio Website](https://github.com/enikosoft/portfolio/blob/main/images/Screen1.png)
2020
![React Portfolio Website](https://github.com/enikosoft/portfolio/blob/main/images/Screen2.png)
21-
![React Portfolio Website](https://github.com/enikosoft/portfolio/blob/main/images/Mob1.jpg)
22-
![React Portfolio Website](https://github.com/enikosoft/portfolio/blob/main/images/Mob2.jpg)
21+
![React Portfolio Website](https://github.com/enikosoft/portfolio/blob/main/images/Mob1.png)
22+
![React Portfolio Website](https://github.com/enikosoft/portfolio/blob/main/images/Mob2.png)
2323

2424
## Sections :bookmark:
2525

images/Mob1.jpg

-15.2 KB
Binary file not shown.

images/Mob1.png

78.4 KB
Loading

images/Mob2.jpg

-23.4 KB
Binary file not shown.

images/Mob2.png

74.4 KB
Loading

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link
99
rel="preload"
1010
as="image"
11-
href="https://eniko-portfolio.s3.eu-west-2.amazonaws.com/photoe.webp"
11+
href="https://evgennikolenko-data.s3.eu-west-2.amazonaws.com/photo.webp"
1212
/>
1313
<title>Portfolio</title>
1414
</head>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hooks/useDownloadPdf.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {useEffect, useState} from 'react';
2+
3+
export const useDownloadPdf = (pdfUrl: string, name?: string) => {
4+
const [pdf, setPdf] = useState<Blob | null>(null);
5+
6+
useEffect(() => {
7+
fetch(pdfUrl)
8+
.then((response) => response.blob())
9+
.then((blob) => setPdf(blob))
10+
.catch((error) => console.error('Error loading PDF:', error));
11+
}, []);
12+
13+
const handleDownload = () => {
14+
if (pdf) {
15+
const url = URL.createObjectURL(pdf);
16+
const link = document.createElement('a');
17+
link.href = url;
18+
link.download = name || 'file.pdf';
19+
20+
document.body.appendChild(link);
21+
link.click();
22+
document.body.removeChild(link);
23+
24+
URL.revokeObjectURL(url);
25+
}
26+
};
27+
28+
return [handleDownload];
29+
};

0 commit comments

Comments
 (0)