|
1 | | -import React, { useEffect, useState } from "react"; |
2 | | -import { StaticImage } from "gatsby-plugin-image"; |
3 | | -import GlobalFooter from "../components/GlobalFooter"; |
4 | | -import GlobalHeader from "../components/GlobalHeader"; |
5 | | -import CommonHead from "../components/CommonHead"; |
6 | | -import ActionButton from "../components/ActionButton"; |
7 | | - |
8 | | -export default function ContactPage() { |
9 | | - // スパム対策 |
10 | | - const [emailAddress, setEmailAddress] = useState<string | null>(null); |
11 | | - useEffect(() => { |
12 | | - const timerId = setTimeout(() => { |
13 | | - setEmailAddress(`contact${String.fromCharCode(64)}utcode.net`); |
14 | | - }, 1000 * 3); |
15 | | - return () => { |
16 | | - clearTimeout(timerId); |
17 | | - }; |
18 | | - }, []); |
19 | | - |
20 | | - return ( |
21 | | - <> |
22 | | - <GlobalHeader /> |
23 | | - <div className="container mx-auto px-4 pt-16 pb-12"> |
24 | | - <h1 className="text-4xl">ut.code(); に連絡する</h1> |
25 | | - </div> |
26 | | - <StaticImage |
27 | | - alt="" |
28 | | - src="../images/contact-header.jpg" |
29 | | - class="w-full h-48" |
30 | | - /> |
31 | | - <main className="container mx-auto px-4 py-16"> |
32 | | - <div className="prose max-w-none"> |
33 | | - <h2>お問い合わせ</h2> |
34 | | - <p>ut.code(); へのお問い合わせは、各種 SNS をご利用ください。</p> |
35 | | - <p className="not-prose flex gap-4"> |
36 | | - <ActionButton to="https://twitter.com/utokyo_code"> |
37 | | - X (旧 Twitter) |
38 | | - </ActionButton> |
39 | | - <ActionButton to="https://line.me/ti/p/%40nlr3843e"> |
40 | | - LINE |
41 | | - </ActionButton> |
42 | | - </p> |
43 | | - <p> |
44 | | - メールでのお問い合わせをご希望の方は、次のメールアドレスまでご連絡ください。 |
45 | | - </p> |
46 | | - <p> |
47 | | - {emailAddress ? ( |
48 | | - <a href={`mailto:${emailAddress}`}>{emailAddress}</a> |
49 | | - ) : ( |
50 | | - "読み込み中です..." |
51 | | - )} |
52 | | - </p> |
53 | | - <h2>ご寄付・ご協賛のお願い</h2> |
54 | | - <p> |
55 | | - {/* eslint-disable prettier/prettier */} |
56 | | - ut.code(); |
57 | | - では、活動を支援していただける方を募集しております。詳細につきましては、次のページをご覧ください。 |
58 | | - {/* eslint-enable prettier/prettier */} |
59 | | - </p> |
60 | | - <p className="not-prose"> |
61 | | - <ActionButton to="/donation/">ご寄付・ご協賛のお願い</ActionButton> |
62 | | - </p> |
63 | | - </div> |
64 | | - </main> |
65 | | - <GlobalFooter /> |
66 | | - </> |
67 | | - ); |
68 | | -} |
69 | | - |
70 | | -export function Head() { |
71 | | - return <CommonHead title="ut.code(); に連絡する" />; |
72 | | -} |
0 commit comments