Skip to content

Commit

Permalink
fix: minor bugs in web (#625)
Browse files Browse the repository at this point in the history
* fix: minor bugs in web

* fix: remove console.log
  • Loading branch information
chiol authored Aug 14, 2024
1 parent 019f92a commit f19e1eb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion apps/web/public/locales/ko/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
},
"role-mgmt": {
"edit-role": "Role 수정",
"update-role-name": "Role 수정",
"update-role-name": "Role Name 수정",
"delete-role": "Role 삭제"
},
"api-key-status": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/entities/channel/ui/channel-info-form.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ChannelInfoForm: React.FC<IProps> = (props) => {
return (
<div className="flex flex-col gap-6">
{type === 'update' && (
<TextInput {...register('id')} label="Project ID" disabled />
<TextInput {...register('id')} label="Channel ID" disabled />
)}
<TextInput
{...register('name')}
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/entities/channel/ui/image-config-form.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ const ImageConfigForm: React.FC<IProps> = (props) => {
className="toggle toggle-sm"
checked={!!domainWhiteList}
onChange={(e) => {
setValue('domainWhiteList', e.target.checked ? [] : null);
setValue('domainWhiteList', e.target.checked ? [] : null, {
shouldDirty: true,
});
}}
disabled={readOnly}
/>
Expand Down
14 changes: 0 additions & 14 deletions apps/web/src/widgets/feedback-table/ui/issue-cell/issue-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ const IssueCell: React.FC<IProps> = (props) => {
);

const { mutateAsync: attatchIssue } = useMutation({
mutationKey: [
'post',
'/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
projectId,
channelId,
feedbackId,
],
mutationFn: async ({ issueId }: { issueId: number }) => {
const { data } = await client.post({
path: '/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
Expand All @@ -100,13 +93,6 @@ const IssueCell: React.FC<IProps> = (props) => {
});

const { mutateAsync: detecthIssue } = useMutation({
mutationKey: [
'delete',
'/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
projectId,
channelId,
feedbackId,
],
mutationFn: async ({ issueId }: { issueId: number }) => {
const { data } = await client.delete({
path: '/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ const ImageConfigSetting: React.FC<IProps> = (props) => {
});

useEffect(() => {
methods.reset({
...data?.imageConfig,
domainWhiteList: data?.imageConfig.domainWhiteList ?? null,
});
if (data?.imageConfig) {
methods.reset({
...data.imageConfig,
domainWhiteList: data.imageConfig.domainWhiteList,
});
}
}, [data]);

const onSubmit = (input: ChannelImageConfig) => {
Expand Down

0 comments on commit f19e1eb

Please sign in to comment.