Skip to content

Static data from JSON file and separation of main components + fix of production css issue

Karl Thomsson requested to merge parsecsv into main
  • Parsed the CSV data into JSON and changed the column values of the CSV to be more programming friendly.
  • JSON course data is now served as a static file. The file is "too big" (338kB max is 128kB), this throws a warning in Next.js since it might throttle performance. This will have to be the case until we implement a more permanent solution (for example putting the data in a database or getting access to Ladok API). Data is available by the courses prop that is given to the Home component and then passed down to the CourseExplorer component.
  • Separated the main panels into three different main components.
  • Fixed an issue where CSS properties did not make it into the production build.
Note about CSS issue:

Styling of MUI components using regular CSS by applying a className will not work in a production build. To solve this you are meant to use the styled hook that MUI provides and then create your styled version of the MUI component using this hook (see components/PanelButton.js for an example of how this can be achieved).

Merge request reports