data-umbrella / event-board-web

Event Board: front-end code
https://events.dataumbrella.org
GNU Affero General Public License v3.0
10 stars 13 forks source link

Contributing: errors in EventCalendarView.jsx & mirage.js (temp file fixes) #351

Closed reshamas closed 1 year ago

reshamas commented 1 year ago

File: https://github.com/data-umbrella/event-board-web/blob/main/src/components/elements/EventCalendarView.jsx

To bypass error when running server, need to comment out line 46:

        //data-event-close="click" effect="solid"
diff --git a/src/components/elements/EventCalendarView.jsx b/src/components/elements/EventCalendarView.jsx
index 68646ed..64d7353 100644
--- a/src/components/elements/EventCalendarView.jsx
+++ b/src/components/elements/EventCalendarView.jsx
@@ -43,7 +43,7 @@ function EventContent({ eventInfo }) {
       <div 
         className={`w-full bg-event-tags-${eventType} rounded-sm text-black font-bold`}  
         data-tip data-for={`tip-${eventInfo.event.id}`} 
-        data-event-close="click" effect="solid" 
+        //data-event-close="click" effect="solid" 
       >
         <div className="text-xs whitespace-normal">
           <b className="mr-1">{eventInfo.timeText}</b>
(END)
reshamas commented 1 year ago

File: https://github.com/data-umbrella/event-board-web/blob/main/src/mirage.js

diff --git a/src/mirage.js b/src/mirage.js
index 6421d63..55942ec 100644
--- a/src/mirage.js
+++ b/src/mirage.js
@@ -80,11 +80,12 @@ export function makeServer({ environment = 'test' } = {}) {
       });

       this.post('/api/v1/current_user/', () => {
-        if (this.isAuthenticated) {
-          return new Response(200, { email: 'test@test.com' });
-        } else {
-          return new Response(400, { status: 'error' });
-        }
+        // if (this.isAuthenticated) {
+        //   return new Response(200, { email: 'test@test.com' });
+        // } else {
+        //   return new Response(400, { status: 'error' });
+        // }
+        return new Response(200, { email: 'test@test.com' });
       });
     },
   });
(END)
reshamas commented 1 year ago

This issue may be resolved.

reshamas commented 1 year ago

Closing for now. If it returns, we can reopen this issue.