このリポジトリは2023-09-09にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
kikikan/backend/resources/js/pages/contact/complete.jsx

56 行
2.2 KiB
React
Raw 通常表示 履歴

2021-10-01 18:50:43 +09:00
import React, { useEffect, useState } from 'react';
2021-09-29 23:38:39 +09:00
import ReactDOM from 'react-dom';
2021-09-29 23:52:07 +09:00
import { Button } from '@material-ui/core';
2021-10-01 18:50:43 +09:00
import Alert from '../../component/alert';
2021-09-29 23:52:07 +09:00
2021-09-29 23:38:39 +09:00
const Contact_Complete = () => {
2021-10-01 18:50:43 +09:00
const [contactEmail, SetContactEmail] = useState('sample@gmail.com');
const [saveFlag, SetSaveFlag] = useState(false);
const saveStorage = () => {
navigator.clipboard.writeText(contactEmail).then(function() {
SetSaveFlag(true);
let timer = setTimeout(()=>{
clearTimeout(timer);
SetSaveFlag(false);
}, 4000)
})
}
2021-09-29 23:38:39 +09:00
return (
2021-09-29 23:52:07 +09:00
<div>
2021-09-30 13:38:14 +09:00
<p className="text-center font-weight-bold ft-20">お問い合わせ完了</p>
2021-10-01 18:50:43 +09:00
<p className="p-2 mt-80-px mb-0 ft-16 ft-md-14 bg-color-1">
2021-09-30 13:38:14 +09:00
お問い合わせが完了しました<br/>
3営業日以内にお返事させていただきます<br/><br/>
2021-09-29 23:52:07 +09:00
万が一届かない場合は以下のメールアドレスに 直接ご連絡くださいませ
</p>
2021-09-30 16:50:44 +09:00
2021-10-01 18:50:43 +09:00
<div className="p-2 my-4 border text-center font-weight-bold">
<p className="m-0 scale-1 pointer" onClick={saveStorage}>{contactEmail}</p>
</div>
2021-09-30 16:50:44 +09:00
2021-10-01 18:50:43 +09:00
<div className="d-flex justify-content-between">
2021-09-30 20:54:09 +09:00
<div className="w-50 pr-1">
2021-10-01 18:50:43 +09:00
<Button fullWidth className="p-3 rounded-20 ft-16 ft-md-13 font-weight-bold text-black bg-color-2" onClick={()=>{window.location.href="/login/p-account/"}}>親ログイン画面へ</Button>
2021-09-29 23:52:07 +09:00
</div>
2021-09-30 16:50:44 +09:00
<div className="w-50 pl-1">
2021-10-01 18:50:43 +09:00
<Button fullWidth className="p-3 rounded-20 ft-16 ft-md-13 font-weight-bold text-black bg-color-2" onClick={()=>{window.location.href="/login/c-account/"}}>子ログイン画面へ</Button>
2021-09-29 23:38:39 +09:00
</div>
2021-09-29 23:52:07 +09:00
</div>
2021-10-01 18:50:43 +09:00
{
saveFlag && <div className="alert-success ft-16 ft-md-14">メールアドレスのコビーに成功しました!</div>
}
2021-09-29 23:52:07 +09:00
</div>
2021-09-29 23:38:39 +09:00
)
}
if(document.getElementById('contact-complete')){
ReactDOM.render(
<Contact_Complete />,
document.getElementById('contact-complete')
)
}