hiyaryan / the-cdj

The Cognitive Distortion Journal (CDJ) is a smart journaling tool that helps remedy distorted thinking. It can feel impossible to follow the CBT technique of labeling distorted thinking and finding alternative modes of thought (i.e. reframing) while cognitive distortions are occurring. The CDJ does that work for you. -- The CDJ is in beta testing!!
https://thecdj.app
2 stars 0 forks source link

Initial reports. #131

Open hiyaryan opened 4 months ago

hiyaryan commented 4 months ago

This PR kicks off reports and closes #120. The first commits, creates a Dashboard component to display the reports. Creates a DashboardRoute to load the Dashboard components. Adds a dashboard nav item and navigation to /reports. Adds a new custom hook to fetch data at reports API. Adds an initial Dashboard page with a button to view a weekly report. Centers and adds margin to nav items in unstacked view.

Screenshot 2024-02-20 at 12 05 18 PM
hiyaryan commented 4 months ago

Reports view can now connect to /weekly endpoint of a new reports API on the backend. The API contains a single getWeeklyReport controller at the endpoint. Express app is now configured for this API and can now be extended.

Clicking the button retrieves a reports object with a test summary.

Screenshot 2024-02-20 at 12 48 45 PM