-
Notifications
You must be signed in to change notification settings - Fork 220
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
imprv: Corrected wording on admin page (/admin/data-transfer) #9098
Changes from all commits
d281014
5670c27
e30356c
7292c56
f02b84c
37c6ae6
41ff64e
7795fd5
ada4bba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,3 +285,18 @@ export const useAcceptedUploadFileType = (): SWRResponse<AcceptedUploadFileType, | |
}, | ||
); | ||
}; | ||
|
||
export const useGrowiHelpDomain = (): SWRResponse<'growi.cloud/help' | 'docs.growi.org', Error> => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Help という文字が含まれていると GROWI.cloud の Help サイトっぽいニュアンスになるので There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
const { data: growiCloudUri } = useGrowiCloudUri(); | ||
const { data: growiAppIdForGrowiCloud } = useGrowiAppIdForGrowiCloud(); | ||
|
||
return useSWRImmutable( | ||
[growiCloudUri, growiAppIdForGrowiCloud], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 他の Hook を見ると |
||
([growiCloudUri, growiAppIdForGrowiCloud]) => { | ||
if (growiCloudUri != null && growiAppIdForGrowiCloud != null) { | ||
return 'growi.cloud/help'; | ||
} | ||
return 'docs.growi.org'; | ||
}, | ||
); | ||
}; |
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.
このロジックは GROWI 全体で使えそうなロジックなので、useGrowiCloudUri と useGrowiAppIdForGrowiCloud を見て growi.cloud/help か docs.growi.org を返却してくれるカスタム Hook を作ったほうがいいかもしれません。
参考
https://github.com/weseek/growi/blob/e25be0382777e0100735252fb4d8d63288b4026c/apps/app/src/stores-universal/context.tsx#L211-L288
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.
作成しました