Compare commits
No commits in common. "778d3b6be8adb6fb883bb1f2477733f99ec2975a" and "69d81d892dea416bb426518222675a921f473c85" have entirely different histories.
778d3b6be8
...
69d81d892d
@ -5,6 +5,3 @@ NEXT_PUBLIC_API_URL=http://localhost:3000
|
|||||||
|
|
||||||
#qsp 로그인 api
|
#qsp 로그인 api
|
||||||
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
||||||
|
|
||||||
#1:1문의 api
|
|
||||||
NEXT_PUBLIC_INQUIRY_API_URL=http://1.248.227.176:38080
|
|
||||||
@ -3,6 +3,3 @@ NEXT_PUBLIC_API_URL=http://172.30.1.35:3000
|
|||||||
|
|
||||||
#qsp 로그인 api
|
#qsp 로그인 api
|
||||||
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
NEXT_PUBLIC_QSP_API_URL=http://1.248.227.176:8120
|
||||||
|
|
||||||
#1:1문의 api
|
|
||||||
NEXT_PUBLIC_INQUIRY_API_URL=http://1.248.227.176:38080
|
|
||||||
@ -1,19 +1,10 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { usePopupController } from '@/store/popupController'
|
import { usePopupController } from '@/store/popupController'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
export default function DoubleBtnAlert() {
|
export default function DoubleBtnAlert() {
|
||||||
const { alertMsg, alert2BtnYes, alert2BtnNo, setAlert2 } = usePopupController()
|
const { alertMsg, alert2BtnYes, alert2BtnNo } = usePopupController()
|
||||||
|
|
||||||
const handleAlert2BtnYes = () => {
|
|
||||||
alert2BtnYes()
|
|
||||||
setAlert2(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleAlert2BtnNo = () => {
|
|
||||||
alert2BtnNo()
|
|
||||||
setAlert2(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="modal-popup alert">
|
<div className="modal-popup alert">
|
||||||
@ -22,12 +13,12 @@ export default function DoubleBtnAlert() {
|
|||||||
<div className="alert-tit">{alertMsg}</div>
|
<div className="alert-tit">{alertMsg}</div>
|
||||||
<div className="alert-btn-wrap">
|
<div className="alert-btn-wrap">
|
||||||
<div className="alert-btn-bx">
|
<div className="alert-btn-bx">
|
||||||
<button className="btn-frame red min" onClick={() => handleAlert2BtnYes()}>
|
<button className="btn-frame red min" onClick={() => alert2BtnYes()}>
|
||||||
確認
|
確認
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="alert-btn-bx">
|
<div className="alert-btn-bx">
|
||||||
<button className="btn-frame n-blue min" onClick={() => handleAlert2BtnNo()}>
|
<button className="btn-frame n-blue min" onClick={() => alert2BtnNo()}>
|
||||||
キャンセル
|
キャンセル
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import { useTitle } from '@/hooks/useTitle'
|
|||||||
import { axiosInstance } from '@/libs/axios'
|
import { axiosInstance } from '@/libs/axios'
|
||||||
|
|
||||||
import 'swiper/css'
|
import 'swiper/css'
|
||||||
import { confirmParamsSerialize } from '@/utils/window'
|
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -39,22 +38,6 @@ export default function Header() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleYes = () => {
|
|
||||||
console.log('yes')
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleNo = () => {
|
|
||||||
console.log('no')
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCofirm = () => {
|
|
||||||
window.neoConfirm(
|
|
||||||
'よろしいですか?',
|
|
||||||
() => console.log('yes'),
|
|
||||||
() => console.log('no'),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="header-warp">
|
<div className="header-warp">
|
||||||
@ -62,7 +45,7 @@ export default function Header() {
|
|||||||
<div className="header-inner">
|
<div className="header-inner">
|
||||||
{backBtn && (
|
{backBtn && (
|
||||||
<div className="back-button-wrap">
|
<div className="back-button-wrap">
|
||||||
<button className="back-button" onClick={handleCofirm}></button>
|
<button className="back-button" onClick={() => router.back()}></button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<h2 className="logo">
|
<h2 className="logo">
|
||||||
|
|||||||
@ -7,12 +7,6 @@ import { usePathname } from 'next/navigation'
|
|||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
import { useSessionStore } from '@/store/session'
|
import { useSessionStore } from '@/store/session'
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
neoConfirm: (msg?: string, alertBtn2Yes?: Function, alertBtn2No?: Function) => boolean
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
interface EdgeProviderProps {
|
interface EdgeProviderProps {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
sessionData: string
|
sessionData: string
|
||||||
@ -50,18 +44,25 @@ export default function EdgeProvider({ children, sessionData }: EdgeProviderProp
|
|||||||
setAlert2(true)
|
setAlert2(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
//alert 함수 변경해서 바인딩
|
//alert 함수 변경해서 바인딩
|
||||||
|
useEffect(() => {
|
||||||
window.alert = function (msg, alertBtn = () => setAlert(false)) {
|
window.alert = function (msg, alertBtn = () => setAlert(false)) {
|
||||||
alertFunc(msg, alertBtn)
|
alertFunc(msg, alertBtn)
|
||||||
}
|
}
|
||||||
// confirm 함수 변경해서 바인딩
|
window.confirm = function (msg = '', alert2BtnYes = () => setAlert2(false), alert2BtnNo = () => setAlert2(false)) {
|
||||||
window.neoConfirm = function (msg: string | undefined, alertBtn2Yes?: Function, alertBtn2No?: Function) {
|
alertFunc2(
|
||||||
if (!msg) return false
|
msg,
|
||||||
alertFunc2(msg, alertBtn2Yes || (() => {}), alertBtn2No || (() => {}))
|
() => {
|
||||||
|
alert2BtnYes()
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
alert2BtnNo()
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// 서버 세션이 있으면 zuatand 세션 데이터 갱신
|
|
||||||
if (sessionData && sessionData !== '') {
|
if (sessionData && sessionData !== '') {
|
||||||
setSession({
|
setSession({
|
||||||
...session,
|
...session,
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
export const confirmParamsSerialize = ({ msg, yes, no }: { msg: string; yes: () => void; no: () => void }) => {
|
|
||||||
return JSON.stringify({ msg, yes, no })
|
|
||||||
}
|
|
||||||
|
|
||||||
export const confirmParamsDeserialize = (params: string) => {
|
|
||||||
return JSON.parse(params)
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user