Game-as-a-Service / Game-Lobby-Web

The frontend of the Game as a Service lobby.
https://lobby.gaas.waterballsa.tw/
Apache License 2.0
25 stars 7 forks source link

fix: use useSearchParams for token retrieval instead use useRouter #391

Closed Yuwen-ctw closed 1 month ago

Yuwen-ctw commented 1 month ago

Why need this change? / Root cause:

Changes made:

Test Scope / Change impact:

-

Issue

JohnsonMao commented 1 month ago

@Yuwen-ctw 不過使用 useSearchParams 後端回傳的網址是不是就要改成 /auth/token?token=eyJhbGciO... 用 query 的方式來傳遞 token

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

GaaSBot commented 1 month ago

Knip Scan Result for https://github.com/Game-as-a-Service/Game-Lobby-Web/pull/391/commits/ad566910035c7a16c716ed150e4645385a8d5310

Unused files (9) | Unused files (9) | |------------------| | .bundlewatch.config.js | | components/shared/Chat/ChatContent.tsx | | components/shared/Chat/ChatMessage.tsx | | components/shared/Chat/index.tsx | | configs/i18nConfigs.ts | | lighthouserc.js | | reset.d.ts | | scripts/knipScanReporter.js | | scripts/lhciScanReporter.js |
Unused dependencies (2) | Unused dependencies (2) | |-------------------------| | **@svgr/webpack** package.json | | **sharp** package.json |
Unused devDependencies (5) | Unused devDependencies (5) | |----------------------------| | **@actions/github** package.json | | **@octokit/core** package.json | | **@storybook/blocks** package.json | | **@storybook/testing-library** package.json | | **@total-typescript/ts-reset** package.json |
Unused exported types (2) | Unused exported types (2) | |---------------------------| | **ChatProps** type components/shared/Chat/v2/Chat.tsx | | **ChatHeaderProps** type components/shared/Chat/v2/ChatHeader.tsx |
Unused exported types in namespaces (1) | Unused exported types in namespaces (1) | |-----------------------------------------| | **BaseBoxFancyProp** interface components/shared/BoxFancy/BoxFancy.tsx |
Configuration issues (1) | Configuration issues (1) | |--------------------------| | **Unused** item in ignoreDependencies: @next/bundle-analyzer |
GaaSBot commented 1 month ago

🤖 Lighthouse Scan Result for https://github.com/Game-as-a-Service/Game-Lobby-Web/pull/391/commits/ad566910035c7a16c716ed150e4645385a8d5310

/rooms | Metric | Value | |--------|-------| | Performance | 70 | | Seo | 78 | | Accessibility | 78 | | HTML Report for LHCI Scan | [Report Link](https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1720961082459-41864.report.html) |
/rooms/abc | Metric | Value | |--------|-------| | Performance | 77 | | Seo | 78 | | Accessibility | 64 | | HTML Report for LHCI Scan | [Report Link](https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1720961082867-47957.report.html) |
/login | Metric | Value | |--------|-------| | Performance | 74 | | Seo | 78 | | Accessibility | 94 | | HTML Report for LHCI Scan | [Report Link](https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1720961083269-26562.report.html) |
Yuwen-ctw commented 1 month ago

@JohnsonMao 感謝提醒,已進行修正,改使用 asPath 屬性來取得 token。