codeforboston / communityconnect

MIT License
24 stars 61 forks source link

Redirect functionality on the Admin Page 404's if there are resources in the cart #369

Closed RajChaudhry closed 5 years ago

RajChaudhry commented 5 years ago

Expected Behavior

When you click on "Community Connect" in the top left corner of the screen, you should be redirected to the client view

Current Behavior

When you click on "Community Connect" in the top left corner of the screen, a modal will pop up, confirming if we want to clear all saved resources, and then redirect you to ccforme.com/admin , which currently doesn't automatically redirect to /:resource/admin

Possible Solution

Context

Steps to Reproduce

  1. Navigate to Admin view of any resource base we currently have
  2. Add something to saved resources
  3. Click on the Community Connect button on the top left corner.

Your Environment

davidholyko commented 5 years ago

Header.js

window.location.href = '/admin';

change to

window.location.href = 'admin';