Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/event timeframes #81

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

Cengelsen
Copy link
Member

No description provided.

@Cengelsen
Copy link
Member Author

Fullskjerm:
fullskjerm

Mobilskjerm:
mobilskjerm

packages/dak-components/lib/cms/index.js Outdated Show resolved Hide resolved
packages/dak-components/lib/cms/index.js Outdated Show resolved Hide resolved
apps/kvarteret/pages/index.js Outdated Show resolved Hide resolved
apps/kvarteret/pages/index.js Outdated Show resolved Hide resolved
apps/kvarteret/pages/index.js Outdated Show resolved Hide resolved
@mathiash98
Copy link
Member

Ser bra ut!

Copy link
Member Author

@Cengelsen Cengelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary line

apps/kvarteret/pages/index.js Outdated Show resolved Hide resolved
apps/kvarteret/components/TodayItem.tsx Outdated Show resolved Hide resolved
@mathiash98
Copy link
Member

This will probably be blocked until we agree on what and how to show "Dette skjer i dag" events from crescat and or studentbergen

packages/dak-components/lib/crescat.ts Outdated Show resolved Hide resolved
Comment on lines +85 to +86
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

You should enable format on save in vscode, it will automatically fix these
https://www.alphr.com/use-prettier-vs-code/

Authorization: `Bearer ${process.env.CRESCAT_TOKEN}`
});

var rawShowTimes = Array();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var rawShowTimes = Array();
var rawShowTimes = Array();
Suggested change
var rawShowTimes = Array();
const rawShowTimes: Show_Times[][] = [];

Use const and let instead of var in javscript

};

// Array to be returned
var jsonShowTimes = Array();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var jsonShowTimes = Array();
const jsonShowTimes: Show_Times[] = [];

// Fetches json payload from the Crescat booking site
const crescatData = await cachedGet("https://app.crescat.io/external/v1/calendar", {
Authorization: `Bearer ${process.env.CRESCAT_TOKEN}`
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
});
}) as CrescatEvent[];

=> Then you will get great typing help

packages/dak-components/lib/crescat.ts Outdated Show resolved Hide resolved
Cengelsen and others added 2 commits October 19, 2022 17:52
This is a better implementation of what i wanted. Good job :)

Co-authored-by: Mathias Haugsbø <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants