Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
registry-url: "https://registry.npmjs.org"

- run: pnpm install --frozen-lockfile

- name: Run Lint
run: pnpm lint

- name: Build packages
run: pnpm build
4 changes: 4 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ onlyBuiltDependencies:
- sharp
- unrs-resolver
- utf-8-validate
publicHoistPattern:
# https://github.com/pnpm/pnpm/issues/8878#issuecomment-2546442011
- "@next/eslint-plugin-next"
- "eslint-plugin-react-hooks"
10 changes: 5 additions & 5 deletions src/app/oauth/callback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export default function OAuthCallback() {
const [oauthError, setOAuthError] = useState<string | null>(null);
const [timedOut, setTimedOut] = useState(false);

const params = new URLSearchParams(window.location.search);
const code = params.get("code");
const state = params.get("state");

// complete the oauth flow and exchange the code for an access token
useEffect(() => {
const processOAuthCallback = async () => {
const params = new URLSearchParams(window.location.search);
const code = params.get("code");
const state = params.get("state");

// the user is already authenticated, nothing to do
if (!ready || authenticated || !code || !state) {
return;
Expand All @@ -35,7 +35,7 @@ export default function OAuthCallback() {
};

processOAuthCallback();
}, [authenticated, completeOAuth, code, ready, state]);
}, [authenticated, completeOAuth, ready]);

// fetch the user's available entities after they've been authenticated
useEffect(() => {
Expand Down