[REFACTOR] 템플릿 데이터를 API에서 패칭하도록 수정#426
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Walkthrough하드코딩된 DEBATE_TEMPLATE을 제거하고 조직 기반 템플릿 API/타입/훅을 추가했으며 LandingPage 컴포넌트들을 Organization 타입으로 리팩토링하고 MSW 모킹(템플릿·정적 아이콘) 및 공유 URL 유틸 명칭 변경과 로컬라이제이션 문자열을 추가했습니다. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Landing as "LandingPage\n(Component)"
participant Selection as "TemplateSelection\n(Component)"
participant Hook as "useGetOrganizationTemplates\n(Hook)"
participant API as "getOrganizationTemplates\n(Client)"
participant Backend as "Backend\n(API Server)"
User->>Landing: 방문
Landing->>Selection: 렌더
Selection->>Hook: 훅 실행 (enabled)
Hook->>API: getOrganizationTemplates()
API->>Backend: GET /organizations/templates
Backend-->>API: organizations 응답
API-->>Hook: 응답 전달
Hook-->>Selection: 데이터/로딩/에러 상태
Selection->>Selection: organizations 필터링 및 TemplateList/TemplateCard 렌더링
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @i-meant-to-be, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 랜딩 페이지에서 토론 템플릿을 불러오는 방식을 근본적으로 개선합니다. 기존에는 하드코딩된 상수 데이터를 사용했지만, 이제는 백엔드 API를 통해 기관별 템플릿 정보를 동적으로 가져와 표시합니다. 이는 데이터의 유연성을 높이고, 새로운 템플릿 추가 및 관리를 용이하게 하며, 사용자에게 최신 정보를 제공할 수 있도록 합니다. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🚀 Preview 배포 완료!
|
There was a problem hiding this comment.
Code Review
안녕하세요. 템플릿 데이터를 하드코딩된 상수에서 API를 통해 가져오도록 리팩터링한 점이 인상 깊습니다. API 연동을 위한 네트워킹 코드, react-query 훅, MSW 목 핸들러까지 꼼꼼하게 구현해주셨네요. 전반적으로 좋은 방향의 개선이지만, 코드 리뷰 중 몇 가지 중요한 문제를 발견했습니다. TemplateSelection.tsx 파일에서 API 응답에 따라 애플리케이션이 중단될 수 있는 치명적인 오류가 있으며, TemplateCard.tsx에서는 공유 URL 생성 로직에 문제가 있어 특정 배포 환경에서 기능이 오작동할 수 있습니다. 자세한 내용은 아래 리뷰 코멘트를 확인해주세요.
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (3)
src/mocks/handlers/organization.ts (1)
7-40: Mock 응답은 타입 고정 + 중복 데이터 상수화가 좋겠습니다.현재는 대형 리터럴/중복 문자열 때문에 스키마 변경 시 누락 위험이 큽니다. 응답 객체를 명시 타입으로 고정하고 공통 payload를 상수로 추출해 주세요.
♻️ 제안 코드
import { http, HttpResponse } from 'msw'; import { ApiUrl } from '../../apis/endpoints'; +import type { GetOrganizationTemplatesResponseType } from '../../apis/responses/organization'; + +const TEMPLATE_DATA = + 'eJyrVspMUbIytjDXUcrMS8tXsqpWykvMTVWyUjJWKCtWMFZ427b1TXPj27YFrxcueN3T8HZWj8LbGVPfdM9V0lEqqSwAqXQODQ7x9%2FWMcgUKJaan5qUkAgWB7IKi%2FOKQ1MRcP4iBbzasedOyESienJ%2BHLP56wwygwUDx8sSivMy8dKfUnBwlq7TEnOJUHaW0zLzM4gwkoVqgtYlJOUCN0dVKxSWJeckgMwKC%2FIOBJhQXpKYmZ4RAnPVmXivQzUDRpPwKqJCff5Cvow%2FI5Zkgqw2NDICyYLPzSnNyIMIBqUUgx6EJBRekJmYDHQcTLgbxU4sg3FodJKc4%2B%2FsNFqf4uYaGBIEtQXPNhDdzFkCiFMVNIZ6%2BrvFOjsGuLnB3QazA6TBzkLMx3AX2DIkhtHXOm0WtCq83zHkzbQfdAwpr8qG7i2JrAbdLRw0%3D'; + +const organizationTemplatesMock: GetOrganizationTemplatesResponseType = { + organizations: [ + // ...기존 organizations 구조 유지, data는 TEMPLATE_DATA 재사용 + ], +}; export const organizationHandlers = [ // GET /api/organizations/templates http.get(ApiUrl.organization + '/templates', () => { - return HttpResponse.json({ - organizations: [ - // ... - ], - }); + return HttpResponse.json(organizationTemplatesMock); }), ];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/mocks/handlers/organization.ts` around lines 7 - 40, The mock response uses large inline literals and duplicated template strings; create a typed response shape (e.g., OrganizationResponse / Organization / Template types) and extract the repeating template payload string into a shared constant (e.g., TEMPLATE_DATA) and reuse it in a single ORGANIZATIONS constant, then return HttpResponse.json({ organizations: ORGANIZATIONS }); update any handler function that currently builds the inline object to import/use these constants and the typed response so the mock is both type-safe and avoids duplication (refer to the organizations field, templates[].data and HttpResponse.json in the diff).src/page/LandingPage/components/TemplateCard.tsx (1)
49-50:key에 index 사용은 괜찮으나,template.name이 고유하다면 index 없이도 충분합니다.만약 같은 organization 내에서
template.name이 중복될 수 있다면 현재 방식이 적절합니다. 다만 API에서 고유한id가 내려온다면 그것을 사용하는 것이 더 안정적입니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/page/LandingPage/components/TemplateCard.tsx` around lines 49 - 50, 현재 TemplateCard.tsx의 organization.templates.map(...)에서 리스트 항목 key를 key={`${template.name}-${index}`}로 설정하고 있는데, 만약 template.name이 고유하다면 index를 제거하고 key={template.name}으로 단순화하세요; 반대로 API가 template.id를 제공한다면 더 안정적인 key인 template.id를 사용하도록 organization.templates.map(...) 내부의 key 할당을 template.id로 바꾸세요.src/page/LandingPage/components/TemplateSelection.tsx (1)
26-26: 필터 결과가 비어있을 때도 구분선이 항상 표시됩니다.특정
templates.length그룹에 해당하는 organization이 없으면 빈TemplateList와 구분선만 렌더링됩니다. 필터 결과가 비어있을 때 해당 섹션과 구분선을 숨기는 것을 고려해 주세요.Also applies to: 32-33
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/page/LandingPage/components/TemplateSelection.tsx` at line 26, The divider <div className="mx-auto h-px w-11/12 bg-neutral-200" /> in TemplateSelection is being rendered even when a group's filtered templates are empty; update the JSX so that both the TemplateList component and its following divider are rendered only when the group's templates array (e.g., templates or filteredTemplates for that group) has length > 0. Locate the group rendering logic inside TemplateSelection (where TemplateList is used) and wrap both the <TemplateList ... /> and the divider in a single conditional (templates.length > 0 or filteredTemplates.length > 0); apply the same change to the other divider occurrence referenced (lines 32–33) so empty groups render nothing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/page/LandingPage/components/TemplateCard.tsx`:
- Line 15: The current logoUrl construction can produce double slashes or the
string "undefined/..." if the env var or icon path are missing; update the
logoUrl creation (the const logoUrl line) to: normalize VITE_API_BASE_URL and
organization.iconPath first (treat import.meta.env.VITE_API_BASE_URL as empty
string if undefined and organization.iconPath as empty string if undefined),
trim trailing slashes from the base and leading slashes from the path, then join
them with a single '/' so you never produce '//' or 'undefined/...'. Use the
existing symbols VITE_API_BASE_URL, organization.iconPath and logoUrl to locate
and replace the logic.
- Around line 71-75: The createTableShareUrl function omits VITE_BASE_PATH so
share links break when the app is served from a subpath; update
createTableShareUrl to read import.meta.env.VITE_BASE_PATH (or default to '')
and join it with the existing base URL (normalizedBaseUrl) ensuring there is
exactly one slash between base URL and base path before appending
/share?data=...; modify the function that currently named createTableShareUrl to
incorporate VITE_BASE_PATH normalization and concatenation so generated URLs
include the configured base path.
In `@src/page/LandingPage/components/TemplateList.tsx`:
- Around line 13-17: The map in TemplateList.tsx uses organization.organization
as the TemplateCard key which can collide; update the key in the
organizations.map(...) that renders <TemplateCard .../> to a stable composite
key using both organization.organization and organization.affiliation (e.g.
interpolate both values into the key) so keys are unique across items; also note
and consider requesting a unique id from the API for TemplateCard props (or use
that id when available) to further guarantee uniqueness.
In `@src/page/LandingPage/components/TemplateSelection.tsx`:
- Line 9: The hook call currently only reads data from
useGetOrganizationTemplates causing a permanent spinner when the API fails;
update the hook destructure to also get isLoading and isError (e.g., const {
data, isLoading, isError } = useGetOrganizationTemplates()) and change the
render logic to: if (isLoading) show the loading spinner, else if (isError)
render an error message or retry UI, otherwise render the templates using data;
also update the rendering block that maps data (lines ~41-52) to guard on
!isError && !isLoading && Array.isArray(data) before mapping.
- Around line 18-39: The current TemplateSelection uses direct indexing into
data.organizations (e.g., data.organizations[0], [1], [2]) for the key which
will crash if fewer than 3 organizations are returned and also misaligns keys
with the filtered lists; fix by computing each filtered list once (e.g.,
templatesOne = data.organizations.filter(org => org.templates.length === 1),
templatesTwo = ..., templatesThree = ...), only render a TemplateList for a
section if its filtered array is non-empty, and derive the key from the filtered
data (for example a stable identifier from the first item or a concatenation of
the filtered organizations' ids/names) instead of hardcoded indices; update
TemplateList props to use these filtered arrays and remove any direct
data.organizations[index] references in the key.
---
Nitpick comments:
In `@src/mocks/handlers/organization.ts`:
- Around line 7-40: The mock response uses large inline literals and duplicated
template strings; create a typed response shape (e.g., OrganizationResponse /
Organization / Template types) and extract the repeating template payload string
into a shared constant (e.g., TEMPLATE_DATA) and reuse it in a single
ORGANIZATIONS constant, then return HttpResponse.json({ organizations:
ORGANIZATIONS }); update any handler function that currently builds the inline
object to import/use these constants and the typed response so the mock is both
type-safe and avoids duplication (refer to the organizations field,
templates[].data and HttpResponse.json in the diff).
In `@src/page/LandingPage/components/TemplateCard.tsx`:
- Around line 49-50: 현재 TemplateCard.tsx의 organization.templates.map(...)에서 리스트
항목 key를 key={`${template.name}-${index}`}로 설정하고 있는데, 만약 template.name이 고유하다면
index를 제거하고 key={template.name}으로 단순화하세요; 반대로 API가 template.id를 제공한다면 더 안정적인
key인 template.id를 사용하도록 organization.templates.map(...) 내부의 key 할당을 template.id로
바꾸세요.
In `@src/page/LandingPage/components/TemplateSelection.tsx`:
- Line 26: The divider <div className="mx-auto h-px w-11/12 bg-neutral-200" />
in TemplateSelection is being rendered even when a group's filtered templates
are empty; update the JSX so that both the TemplateList component and its
following divider are rendered only when the group's templates array (e.g.,
templates or filteredTemplates for that group) has length > 0. Locate the group
rendering logic inside TemplateSelection (where TemplateList is used) and wrap
both the <TemplateList ... /> and the divider in a single conditional
(templates.length > 0 or filteredTemplates.length > 0); apply the same change to
the other divider occurrence referenced (lines 32–33) so empty groups render
nothing.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
public/locales/en/translation.jsonpublic/locales/ko/translation.jsonsrc/apis/apis/organization.tssrc/apis/endpoints.tssrc/apis/responses/organization.tssrc/constants/debate_template.tssrc/hooks/query/useGetOrganizationTemplates.tssrc/mocks/handlers/global.tssrc/mocks/handlers/organization.tssrc/page/LandingPage/components/TemplateCard.tsxsrc/page/LandingPage/components/TemplateList.tsxsrc/page/LandingPage/components/TemplateSelection.tsxsrc/type/type.ts
💤 Files with no reviewable changes (1)
- src/constants/debate_template.ts
a1092cb to
b606b6c
Compare
useon
left a comment
There was a problem hiding this comment.
숀 ~!! 템플릿 데이터를 api를 통해 페칭하도록 수정된 것 확인했습니다!!! 코멘트 조금 달았는데 확인해 주시면 감사하겠습니다 ^_^!!!
| function createTableShareUrl(encodeData: string): string { | ||
| const baseUrl = import.meta.env.VITE_SHARE_BASE_URL || window.location.origin; | ||
| const normalizedBaseUrl = baseUrl.replace(/\/+$/, ''); | ||
| const basePath = import.meta.env.VITE_BASE_PATH; | ||
| const pathPrefix = basePath && basePath !== '/' ? basePath : ''; | ||
| return `${normalizedBaseUrl}${pathPrefix}/share?data=${encodeData}`; |
There was a problem hiding this comment.
src/util/arrayEncoding.ts에 있는 같은 이름의 살짝 다른 역할을 하는 함수가 있어요!
export function createTableShareUrl(
baseUrl: string | undefined,
data: DebateTableData,
): string {
const encoded = encodeDebateTableData(data);
const resolvedBaseUrl =
baseUrl && baseUrl.trim() !== '' ? baseUrl : window.location.origin;
const normalizedBaseUrl = resolvedBaseUrl.replace(/\/+$/, '');
const basePath = import.meta.env.VITE_BASE_PATH;
const pathPrefix = basePath && basePath !== '/' ? basePath : '';
return `${normalizedBaseUrl}${pathPrefix}/share?data=${encoded}`;
}해당 함수와 이름은 같지만 살짝 다른 차이가 존재하는 것 같네요.
이미 인코딩 되어 있는 것을 그대로 붙이거나 아니면 인코딩이 필요하기 때문에 인코딩 처리를 하고 난 다음에 붙이는 차이인 것 같아요.
같은 곳에서 함께 관리하고 사용처에서 불러와 사용하는 방식은 어떨까요?
현재 두 함수의 이름이 같으니까 쓰임에 따라
- createTableShareUrlFromData(baseUrl, data):
DebateTableData를 받아 내부에서 인코딩 후 URL 생성 - createTableShareUrlFromEncodedData(baseUrl, encodedData):
이미 인코딩된 문자열을 받아 URL만 조립
요런 식으로 수정해 볼 수도 있겠네요!
There was a problem hiding this comment.
그러네요. 두 함수 응집도가 상당한 편이네요. 의견 남겨주신 대로 두 함수를 다른 이름으로 분리했구요, 두 함수의 응집도가 상당한 만큼 원래는 TemplateCard.tsx에 있었던 함수 본문 역시 arrayEncoding.ts 파일에 함께 합쳐 두었습니다. 좋은 의견 감삼다 🔥
src/mocks/handlers/organization.ts
Outdated
| { | ||
| organization: '한앎', | ||
| affiliation: '한양대', | ||
| iconPath: '/icons/icon1.png', |
There was a problem hiding this comment.
mock 상이라 임의 확인을 위해서 iconPath도 임의로 작성된 것이죠??
There was a problem hiding this comment.
원래는 말씀하신 것처럼 대충 확인하려는 생각에 간단히 작성했는데요. 코드 추가하는 게 그렇게 큰 작업은 아닐 것 같아 정적 에셋(정확히는 템플릿 아이콘에 대한 요청만)에 대한 요청도 모방하도록 msw 핸들러를 개선해 두었습니다.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main.tsx (1)
19-28:⚠️ Potential issue | 🟡 Minor
Dismissed로그와 실제 동작이 불일치합니다.현재는 비
/api·/icon요청도 결국print.warning()이 실행되어, 실제로 dismiss되지 않습니다. 의도대로 무시하려면 early return이 필요합니다.수정 예시
onUnhandledRequest: (request, print) => { - // Let worker dismiss non-api calls by check whether url includes '/api' - if (!request.url.includes('/api') && !request.url.includes('/icon')) { - console.log( - "Dismissed request that doesn't include /api/: " + request.url, - ); - } - - print.warning(); + const { pathname } = new URL(request.url); + if (!pathname.includes('/api') && !pathname.includes('/icon')) { + return; + } + print.warning(); },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main.tsx` around lines 19 - 28, The onUnhandledRequest handler currently logs non-/api and non-/icon requests but still calls print.warning(), so they are not actually dismissed; update the onUnhandledRequest function to early-return after the console.log for requests where !request.url.includes('/api') && !request.url.includes('/icon') so that print.warning() is not executed for those dismissed requests (i.e., keep the existing condition, the console.log call, then return from the handler to skip calling print.warning()).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/mocks/handlers/static_asset.ts`:
- Around line 7-29: The handler currently ignores params.iconFileName and always
returns sampleLogo; update the http.get handler to validate and map iconFileName
to a known set of local assets (e.g., a lookup map keyed by iconFileName) and
return a 404 HttpResponse when there is no match, and when fetching the mapped
asset check the fetch response (response.ok) before calling arrayBuffer — if
fetch returns non-ok, log the response status and return a 502/500 HttpResponse;
keep using HttpResponse.arrayBuffer with Content-Type and Cache-Control for
successful responses and ensure errors fall through to the catch path that
returns an appropriate error status.
---
Outside diff comments:
In `@src/main.tsx`:
- Around line 19-28: The onUnhandledRequest handler currently logs non-/api and
non-/icon requests but still calls print.warning(), so they are not actually
dismissed; update the onUnhandledRequest function to early-return after the
console.log for requests where !request.url.includes('/api') &&
!request.url.includes('/icon') so that print.warning() is not executed for those
dismissed requests (i.e., keep the existing condition, the console.log call,
then return from the handler to skip calling print.warning()).
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
src/assets/template_logo/han_alm.pngis excluded by!**/*.pngsrc/assets/template_logo/hantomak.pngis excluded by!**/*.pngsrc/assets/template_logo/igam.pngis excluded by!**/*.pngsrc/assets/template_logo/jungseonto.pngis excluded by!**/*.pngsrc/assets/template_logo/kogito.pngis excluded by!**/*.pngsrc/assets/template_logo/kondae_time.pngis excluded by!**/*.pngsrc/assets/template_logo/mcu.pngis excluded by!**/*.pngsrc/assets/template_logo/nogotte.pngis excluded by!**/*.pngsrc/assets/template_logo/osansi.pngis excluded by!**/*.pngsrc/assets/template_logo/seobangjeongto.pngis excluded by!**/*.pngsrc/assets/template_logo/todallae.pngis excluded by!**/*.pngsrc/assets/template_logo/visual.pngis excluded by!**/*.pngsrc/assets/template_logo/yuppm_law_track.pngis excluded by!**/*.png
📒 Files selected for processing (4)
src/main.tsxsrc/mocks/handlers/global.tssrc/mocks/handlers/organization.tssrc/mocks/handlers/static_asset.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/mocks/handlers/global.ts
- src/mocks/handlers/organization.ts
|
/noti @useon 리뷰에 승인 남겨주셨으나, 추가된 커밋이 더 있어서 리뷰 요청을 다시 드립니다. 바쁘시겠으나 여유 있으실 때 잠깐 다시 확인해주시면 정말 감사하겠습니다! |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/util/arrayEncoding.test.ts (1)
3-7: 신규 공개 함수(createTableShareUrlFromEncodedData) 테스트도 추가해두면 좋겠습니다.현재는
createTableShareUrlFromTable중심으로만 검증되고 있어, 신규 함수의 base URL 정규화/쿼리 조합 회귀를 놓칠 수 있습니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/util/arrayEncoding.test.ts` around lines 3 - 7, Add unit tests that exercise the new public function createTableShareUrlFromEncodedData (in addition to existing createTableShareUrlFromTable tests) to ensure base URL normalization and correct query composition: test with bases having/omitting trailing slashes and existing query params, confirm the encoded data is appended as the expected query param, and verify round-trip decoding via extractTableShareUrl and decodeDebateTableData (or that decodeDebateTableData of the extracted value equals the original encodeDebateTableData output). Include cases that mirror current encodeDebateTableData/decodeDebateTableData behavior so future regressions in query joining or base URL handling are caught.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/util/arrayEncoding.ts`:
- Around line 36-41: The createTableShareUrlFromEncodedData function currently
uses "import.meta.env.VITE_SHARE_BASE_URL || window.location.origin" which does
not treat all-whitespace env values as empty; update its baseUrl handling to
match the normalization used earlier in this file (lines near the other helper):
read VITE_SHARE_BASE_URL, trim it and treat empty/whitespace-only values as
missing, then fallback to window.location.origin, then apply the same
trailing-slash strip (normalizedBaseUrl = baseUrl.replace(/\/+$/, '')) and keep
the existing basePath/pathPrefix logic so the final URL is correct; reference
the function name createTableShareUrlFromEncodedData when making this change.
---
Nitpick comments:
In `@src/util/arrayEncoding.test.ts`:
- Around line 3-7: Add unit tests that exercise the new public function
createTableShareUrlFromEncodedData (in addition to existing
createTableShareUrlFromTable tests) to ensure base URL normalization and correct
query composition: test with bases having/omitting trailing slashes and existing
query params, confirm the encoded data is appended as the expected query param,
and verify round-trip decoding via extractTableShareUrl and
decodeDebateTableData (or that decodeDebateTableData of the extracted value
equals the original encodeDebateTableData output). Include cases that mirror
current encodeDebateTableData/decodeDebateTableData behavior so future
regressions in query joining or base URL handling are caught.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/components/ShareModal/ShareModal.stories.tsxsrc/hooks/useTableShare.tsxsrc/page/LandingPage/components/TemplateCard.tsxsrc/page/LandingPage/hooks/useLandingPageHandlers.tssrc/util/arrayEncoding.test.tssrc/util/arrayEncoding.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/page/LandingPage/components/TemplateCard.tsx
useon
left a comment
There was a problem hiding this comment.
숀 !!! 리뷰 반영해 주시고 파싱도 더 안전하게 바꾸셨네요 최고입니다 .. ! 꼼꼼하게 작업해 주셔서 감사하니다 어프루브 !!!!
|
🧹 Preview 배포가 정리되었습니다. |
🚩 연관 이슈
closed #425
📝 작업 내용
커찬이 작업해 준 기관별 템플릿 API를 구현 및 랜딩 페이지에 적용했어요.
세부 작업 내역
3월 3일 화요일 추가
BASE_URL/icon/ICON_FILE_NAME의 형태)🏞️ 스크린샷 (선택)
없음
🗣️ 리뷰 요구사항 (선택)
잘 동작하는지 한 번 랜딩 페이지 열어서 확인해주시면 감사하겠습니다! (참고로 PR 올리는 현 시점 기준으로는 중선관위 사진은 안 보이는 게 정상입니다.)
Summary by CodeRabbit
New Features
Localization