-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(admin): supabase 연결 및 설문 생성 로직 작성 #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모노레포로 구성하신거 좋네요
@@ -47,5 +47,12 @@ | |||
} | |||
} | |||
}, | |||
"nxCloudAccessToken": "ZjgyN2VmY2EtZjljMy00NGNiLTllMGUtMWI3OGQ2ZDAxN2M3fHJlYWQtd3JpdGU=" | |||
"nxCloudAccessToken": "ZjgyN2VmY2EtZjljMy00NGNiLTllMGUtMWI3OGQ2ZDAxN2M3fHJlYWQtd3JpdGU=", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요 토큰은 노출되어도 괜찮은가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
배포할 프로젝트가 아니면 크게 상관은 없는거 같습니당
export const SupabaseContext = createContext<SupabaseContextValue | null>(null); | ||
SupabaseContext.displayName = 'SupabaseContext'; | ||
|
||
export const SupabaseProvider = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supabase를 컨텍스트로 묶으신 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
web,admin 프로젝트에서 supabase 인스턴스 얻는 코드를 공통으로 사용하고 싶어서 묶었습니다!
return <div>Admin!!</div>; | ||
const mutate = useCreateSurvey(); | ||
|
||
const onMutateSurvey = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4: 직접 연결되는 컴포넌트 네이밍은 handle-
props로 넘길때는 on- 각각 접두사를 사용하면 이후 명확하게 알 수 있어요
hasOption: boolean; | ||
}[] = []; | ||
|
||
sectionIds.forEach((id, i) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p3: forEach가 아니라 map으로 함수를 반환하게 사용할 수 없을까요? 사소하지만 함수형으로 사용하도록 노력하면 명시적으로 작성할 수 있을 것 같아요
@@ -8,6 +9,8 @@ const root = ReactDOM.createRoot( | |||
); | |||
root.render( | |||
<StrictMode> | |||
<App /> | |||
<SupabaseProvider supabaseKey={import.meta.env.VITE_SUPABASE_KEY}> | |||
<App /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p3: 가장 최상단에서 ErrorBoundary로 묶어서 처리하면 이후 에러가 전파되는 상황에서 에러를 처리하기가 좋습니닷
작업한 내용