공용함수 사용 처리
This commit is contained in:
@@ -18,6 +18,7 @@ import { QnaSaveParams, QnaSaveResponse } from '@/entities/support/model/types';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
import { useKeyboardAware } from '@/shared/lib/hooks/use-keyboard-aware';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
|
||||
export enum QnaRegisterPropsName {
|
||||
Mid = 'Mid',
|
||||
@@ -79,23 +80,7 @@ export const QnaRegisterPage = () => {
|
||||
setContents(value);
|
||||
}
|
||||
};
|
||||
const showAlert = (msg: string) => {
|
||||
overlay.open(({
|
||||
isOpen,
|
||||
close,
|
||||
unmount
|
||||
}) => {
|
||||
return (
|
||||
<Dialog
|
||||
afterLeave={unmount}
|
||||
open={isOpen}
|
||||
onClose={close}
|
||||
message={msg}
|
||||
buttonLabel={[t('support.qna.confirmButton')]}
|
||||
/>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
const checkEmail = (email: string) => {
|
||||
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
|
||||
if (email != '' && email != 'undefined' && re.test(email)) {
|
||||
|
||||
Reference in New Issue
Block a user