Skip to content

Commit

Permalink
Merge pull request #63 from scientist-softserv/restore-login
Browse files Browse the repository at this point in the history
restore login
  • Loading branch information
alishaevn authored Feb 28, 2024
2 parents f78ccaa + e4a0271 commit 06c870b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,39 @@ yarn upgrade @scientist-softserv/webstore-component-library --latest
Using the local github repository requires you to manually clone the component library to your computer, build, and link it:

#### Preparing your local copy of the component library:
_Prerequisite: clone the [webstore-component-library](https://github.com/scientist-softserv/webstore-component-library.git) and [get the app running](https://github.com/scientist-softserv/webstore-component-library#running-the-app)_

cd webstore-component-library
yarn link # now there is a magic symlink in `~/.config/yarn/link` usable by the webstore app
_Prerequisite: clone the [webstore-component-library](https://github.com/scientist-softserv/webstore-component-library.git) (wcl) and [get the app running](https://github.com/scientist-softserv/webstore-component-library#running-the-app)_
``` bash
cd webstore-component-library
yarn link # now there is a magic symlink in `~/.config/yarn/link` usable by the webstore app
```

Choose one of the below:

npm run build-lib # must be run every time you want a change to show in the webstore
npm run watch-lib # run once and the wcl will watch for changes
``` bash
npm run build-lib # must be run every time you want a change to show in the webstore
npm run watch-lib # run once and the wcl will watch for changes
```

#### Preparing your local copy of the webstore:

# run in a separate terminal window than where the wcl is
cd webstore
yarn link "@scientist-softserv/webstore-component-library"
yarn remove @scientist-softserv/webstore-component-library
(restart the dev server)
``` bash
# run in a separate terminal window than where the wcl is

cd webstore
yarn link "@scientist-softserv/webstore-component-library"
yarn add react-bootstrap@<version-number> # e.g. yarn add [email protected]
# use the version listed in the dependencies of "@scientist-softserv/webstore-component-library" in the "yarn.lock" file.
yarn remove @scientist-softserv/webstore-component-library
(restart the dev server)
```

#### Return to using the packaged version of the webstore-component-library:
# in the webstore repository
yarn unlink "@scientist-softserv/webstore-component-library"
git checkout package.json yarn.lock
yarn install --check-files --force
(restart the dev server)
``` bash
# in the webstore repository

yarn unlink "@scientist-softserv/webstore-component-library"
git checkout package.json yarn.lock
yarn install --check-files --force
(restart the dev server)
```

## Exception Handling
The application is configured to use Sentry. Refer to ".env.development.example" for how to find the necessary variables.
Expand Down
5 changes: 4 additions & 1 deletion utils/api/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const fetcher = (url, token) => {
.then(res => res.data)
.catch(error => {
Sentry.captureException(error)
throw error
// the `signIn` function from "next-auth/react" uses `fetcher` and returns a 404 error response. throwing that error causes an
// `OAUTH_CALLBACK_HANDLER_ERROR`, which prevents users from signing in. `signIn` doesn't pass a url to `fetcher`. the check below
// ensures that other errors still get thrown
if (error.config.url !== null) throw error
})
}

Expand Down

0 comments on commit 06c870b

Please sign in to comment.