Skip to content

Commit 927876d

Browse files
aliyaa23helenailic
andauthored
Aliyaa2 (#82)
* created pointbar component * point bar component * Added {name} points to pointBar, tried testing locally but was getting a login error * Added {name} points to pointBar, tried testing locally but was getting a login error * Pointbar and {name}'s point tracker when user is logged in * adding conditional rendering --------- Co-authored-by: helenailic <[email protected]>
1 parent 08352dd commit 927876d

File tree

24 files changed

+6770
-417
lines changed

24 files changed

+6770
-417
lines changed

.eslintrc.json

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,10 @@
88
"standard-with-typescript",
99
"prettier"
1010
],
11-
"plugins": [
12-
"react",
13-
"prettier"
14-
],
11+
"plugins": ["react", "prettier"],
1512
"rules": {
16-
"semi": [
17-
1,
18-
"always"
19-
],
20-
"quotes": [
21-
2,
22-
"single"
23-
],
13+
"semi": [1, "always"],
14+
"quotes": [2, "single"],
2415
"max-len": ["error", { "code": 80 }],
2516
"no-unused-vars": 1,
2617
"multiline-ternary": 0,
@@ -45,14 +36,11 @@
4536
},
4637
"overrides": [
4738
{
48-
"files": [
49-
"vite.config.ts",
50-
".eslintrc.cjs"
51-
],
39+
"files": ["vite.config.ts", ".eslintrc.cjs"],
5240
"parserOptions": {
5341
"parser": "@typescript-eslint/parser",
5442
"project": "./tsconfig.json"
5543
}
5644
}
5745
]
58-
}
46+
}

.github/workflows/node.js.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ name: Node.js CI
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ['main']
99

1010
permissions: write-all
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
@@ -20,25 +19,25 @@ jobs:
2019
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2120

2221
steps:
23-
- uses: actions/checkout@v4
24-
25-
- name: Setup Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: ${{ matrix.node-version }}
29-
30-
- name: Install dependencies
31-
run: npm install
32-
33-
- name: Build
34-
run: npm run build
35-
36-
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v3
38-
with:
39-
# Upload dist folder
40-
path: './dist'
41-
42-
- name: Deploy to GitHub Pages
43-
id: deployment
44-
uses: actions/deploy-pages@v4
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Build
33+
run: npm run build
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
# Upload dist folder
39+
path: './dist'
40+
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"trailingComma": "none",
44
"singleQuote": true,
55
"printWidth": 80
6-
}
6+
}

404.html

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<title>WCS Points</title>
6-
<script type="text/javascript">
7-
// handles redirects for single page apps on GitHub Pages
8-
var segmentCount = 0;
9-
var location = window.location;
10-
11-
// redirect to the index.html with a special query parameter containing the path
12-
location.replace(
13-
location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') +
14-
'/' +
15-
'?path=' +
16-
location.pathname.slice(1).split('/').slice(segmentCount).join('/') +
17-
(location.search || '') +
18-
(location.hash || '')
19-
);
20-
</script>
21-
</head>
22-
<body>
23-
Redirecting...
24-
</body>
25-
</html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>WCS Points</title>
6+
<script type="text/javascript">
7+
// handles redirects for single page apps on GitHub Pages
8+
var segmentCount = 0;
9+
var location = window.location;
10+
11+
// redirect to the index.html with a special query parameter containing the path
12+
location.replace(
13+
location.protocol +
14+
'//' +
15+
location.hostname +
16+
(location.port ? ':' + location.port : '') +
17+
'/' +
18+
'?path=' +
19+
location.pathname.slice(1).split('/').slice(segmentCount).join('/') +
20+
(location.search || '') +
21+
(location.hash || '')
22+
);
23+
</script>
24+
</head>
25+
<body>
26+
Redirecting...
27+
</body>
28+
</html>

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
<title>WCS Points</title>
88
<script type="text/javascript">
99
// Thandles the redirect from 404.html
10-
(function() {
10+
(function () {
1111
var path = window.location.search.match(/path=([^&]*)/);
1212
if (path) {
1313
var originalPath = path[1];
1414
var search = window.location.search.replace(/path=[^&]*(&|$)/, '');
1515
search = search === '?' ? '' : search;
16-
17-
window.history.replaceState(null, null,
18-
'/' + originalPath +
19-
(search || '') +
20-
(window.location.hash || '')
16+
17+
window.history.replaceState(
18+
null,
19+
null,
20+
'/' + originalPath + (search || '') + (window.location.hash || '')
2121
);
2222
}
2323
})();

0 commit comments

Comments
 (0)