Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/#952
Browse files Browse the repository at this point in the history
  • Loading branch information
j-nary committed Nov 13, 2024
2 parents 21da436 + fabcf36 commit 7182a21
Show file tree
Hide file tree
Showing 28 changed files with 1,151 additions and 164 deletions.
1 change: 1 addition & 0 deletions packages/react-mentions/src/SuggestionsOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function SuggestionsOverlay({
return suggestionsToRender
}

//여기서 엔터를 눌렀을 때 해당 값 설정되도록 만들수는 없을까?
const renderSuggestion = (result, queryInfo, index) => {
const isFocused = index === focusIndex
const { childIndex, query } = queryInfo
Expand Down
59 changes: 31 additions & 28 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import '@sopt-makers/ui/dist/index.css';
import { DialogProvider, ToastProvider } from '@sopt-makers/ui';
import { MentionProvider } from '@components/feed/Mention/MentionContext';
import { globalStyles } from 'styles/globals';
import { SearchMentionProvider } from '@components/form/SearchMention/SearchMentionContext';

// 리액트 하이드레이션 에러를 피하기 위해 사용. 렌더링에 관여하지 않는 코드여서 if 문으로 분기처리
if (typeof window !== 'undefined') {
Expand Down Expand Up @@ -97,40 +98,42 @@ function MyApp({ Component, pageProps }: AppProps) {
}, []);

return (
<MentionProvider>
<QueryClientProvider client={queryClient}>
<SEO />
<Script
id="gtag-base"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
<SearchMentionProvider>
<MentionProvider>
<QueryClientProvider client={queryClient}>
<SEO />
<Script
id="gtag-base"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer', '${GTM_ID}');
`,
}}
/>
<Layout>
<DialogProvider>
<ToastProvider>
<OverlayProvider>
{isServiceReady ? (
<>
<Header />
<Component {...pageProps} />
</>
) : (
<Loader />
)}
</OverlayProvider>
</ToastProvider>
</DialogProvider>
</Layout>
</QueryClientProvider>
</MentionProvider>
}}
/>
<Layout>
<DialogProvider>
<ToastProvider>
<OverlayProvider>
{isServiceReady ? (
<>
<Header />
<Component {...pageProps} />
</>
) : (
<Loader />
)}
</OverlayProvider>
</ToastProvider>
</DialogProvider>
</Layout>
</QueryClientProvider>
</MentionProvider>
</SearchMentionProvider>
);
}

Expand Down
6 changes: 6 additions & 0 deletions pages/edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const EditPage = () => {
const formMethods = useForm<FormType>({
mode: 'onChange',
resolver: zodResolver(schema),
defaultValues: {
detail: {
coLeader: [],
},
},
});

const onSubmit: SubmitHandler<FormType> = async formData => {
Expand Down Expand Up @@ -95,6 +100,7 @@ const EditPage = () => {
joinableParts,
canJoinOnlyActiveGeneration: formData?.canJoinOnlyActiveGeneration,
note: formData?.note ?? '',
coLeader: formData?.coMeetingLeaders,
},
});
}
Expand Down
5 changes: 5 additions & 0 deletions pages/make/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ const MakePage = () => {
const formMethods = useForm<FormType>({
mode: 'onChange',
resolver: zodResolver(schema),
defaultValues: {
detail: {
coLeader: [],
},
},
});
const { isValid } = formMethods.formState;
const { mutateAsync: mutateCreateMeeting, isLoading: isSubmitting } = useMutation({
Expand Down
2 changes: 1 addition & 1 deletion pages/post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function PostPage() {
const { mutate: togglePostLike } = useMutationPostLike(query.id as string);

const { mutate: mutateDeletePost } = useMutation({
mutationFn: () => DELETE('/post/v1/{postId}', { params: { path: { postId: post!.id } } }),
mutationFn: () => DELETE('/post/v2/{postId}', { params: { path: { postId: post!.id } } }),
onSuccess: () => router.replace(`/detail?id=${post?.meeting.id}`),
});

Expand Down
Loading

0 comments on commit 7182a21

Please sign in to comment.