Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Commit 06177eb

Browse files
committed
fix deepscan issues
1 parent 0383a88 commit 06177eb

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.github/workflows/lighthouse.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test Lighthouse Check with Minimum Score Enforcement
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lighthouse-check:
10+
runs-on: ubuntu-latest
11+
continue-on-error: true
12+
steps:
13+
- uses: actions/checkout@master
14+
- run: npm install
15+
- name: Run Lighthouse
16+
uses: foo-software/lighthouse-check-action@master
17+
id: lighthouseCheck
18+
with:
19+
accessToken: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
20+
apiToken: "5f8b9c5d94bddc0025bc528d_01cdb87c-1c48-4bf6-9729-a1c54fd55488"
21+
urls: "8fb3f66a-791d-4ff8-a419-149c7882d20a,https://dashboard.hacksc.com,https://odyssey.hacksc.com"
22+
- name: Handle Lighthouse Check results
23+
uses: foo-software/lighthouse-check-status-action@master
24+
with:
25+
commentUrl: "push"
26+
lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
27+
minAccessibilityScore: "0"
28+
minBestPracticesScore: "0"
29+
minPerformanceScore: "0"
30+
minProgressiveWebAppScore: "0"
31+
minSeoScore: "0"

pages/dashboard.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,17 @@ const Dashboard = ({
8888
export async function getServerSideProps({ req }) {
8989
const profile = await getProfile(req);
9090
//const houses = await getHouses(req);
91-
const announcements = await getAnnouncements(req, profile);
91+
let announcements = [];
92+
if(profile) {
93+
announcements = await getAnnouncements(req, profile);
94+
}
9295
const hackathonConstants = await getHackathonConstants();
9396
const currentEvents = await getPublicEvents(req);
9497
const team = await getTeam(req);
9598
const events = currentEvents ? currentEvents["events"] : [];
9699

97100
const houses = [];
98-
const view = profile.role;
101+
const view = profile ? profile.role : null;
99102

100103
// Null profile means user is not logged in
101104
if (!profile) {

0 commit comments

Comments
 (0)