Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>hatena/renovate-config",
":automergePatch",
":disableRateLimiting"
],
"extends": ["github>hatena/renovate-config", ":automergePatch", ":disableRateLimiting"],
"schedule": ["before 8am on Saturday"],
"labels": ["dependencies"],
"platformAutomerge": true,
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: check

on:
push:
branches-ignore: main
branches-ignore: [main]

jobs:
ci:
Expand All @@ -29,9 +29,9 @@ jobs:
if: steps.build-cache.outputs.cache-hit != 'true'
run: yarn turbo build
env:
NEXT_PUBLIC_AIRTABLE_API_KEY: ${{ secrets.NEXT_PUBLIC_AIRTABLE_API_KEY }}
NEXT_PUBLIC_AIRTABLE_BASE_INQUIRYFORM: ${{ secrets.NEXT_PUBLIC_AIRTABLE_BASE_INQUIRYFORM }}
NEXT_PUBLIC_AIRTABLE_TABLE_INQUIRYFORM: ${{ secrets.NEXT_PUBLIC_AIRTABLE_TABLE_INQUIRYFORM }}
NEXT_PUBLIC_AIRTABLE_PAT: ${{ secrets.NEXT_PUBLIC_AIRTABLE_PAT }}
NEXT_PUBLIC_AIRTABLE_BASE: ${{ secrets.NEXT_PUBLIC_AIRTABLE_BASE }}
NEXT_PUBLIC_AIRTABLE_TABLE: ${{ secrets.NEXT_PUBLIC_AIRTABLE_TABLE }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
run: yarn build-static
env:
NODE_ENV: production
NEXT_PUBLIC_AIRTABLE_API_KEY: ${{ secrets.NEXT_PUBLIC_AIRTABLE_API_KEY }}
NEXT_PUBLIC_AIRTABLE_BASE_INQUIRYFORM: ${{ secrets.NEXT_PUBLIC_AIRTABLE_BASE_INQUIRYFORM }}
NEXT_PUBLIC_AIRTABLE_TABLE_INQUIRYFORM: ${{ secrets.NEXT_PUBLIC_AIRTABLE_TABLE_INQUIRYFORM }}
NEXT_PUBLIC_AIRTABLE_PAT: ${{ secrets.NEXT_PUBLIC_AIRTABLE_PAT }}
NEXT_PUBLIC_AIRTABLE_BASE: ${{ secrets.NEXT_PUBLIC_AIRTABLE_BASE }}
NEXT_PUBLIC_AIRTABLE_TABLE: ${{ secrets.NEXT_PUBLIC_AIRTABLE_TABLE }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
10 changes: 3 additions & 7 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const path = require("path");
const path = require("node:path");

const buildLintCommand = (filenames) =>
`npx yarn run biome lint ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(" ")}`;
`npx yarn run biome lint ${filenames.map((f) => path.relative(process.cwd(), f)).join(" ")}`;

const buildFormatCommand = (filenames) =>
`npx yarn run biome format ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(" ")} `;
`npx yarn run biome format ${filenames.map((f) => path.relative(process.cwd(), f)).join(" ")}`;

module.exports = {
"**/*.{js,jsx,ts,tsx}": [buildLintCommand],
Expand Down
9 changes: 1 addition & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,5 @@
"scss.validate": false,
"stylelint.enable": true,
"stylelint.configFile": ".stylelintrc.js",
"stylelint.validate": [
"css",
"scss",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact"
]
"stylelint.validate": ["css", "scss", "javascript", "typescript", "javascriptreact", "typescriptreact"]
}
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 80
"lineWidth": 120,
"ignore": ["src/pages/news"]
},
"organizeImports": {
"enabled": true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build-static": "next build && next export",
"start": "serve out",
"lint": "yarn run biome lint ./src",
"lint:fix": "yarn run biome lint ./src --apply",
"lint:fix": "yarn run biome lint ./src --write",
"lint:fix:css": "stylelint --fix \"**/*.{js,jsx,ts,tsx}\"",
"format": "yarn run biome format ./src --write",
"check": "yarn run biome check ./src",
Expand Down
44 changes: 8 additions & 36 deletions src/components/footer/BottomMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from "@emotion/react";
import Link from "next/link";
import { FC } from "react";
import type { FC } from "react";

export const BottomMenu = () => {
const wrapperStyle = css`
Expand Down Expand Up @@ -40,50 +40,26 @@ export const BottomMenu = () => {
<div css={wrapperStyle}>
<section id="use_ethereum">
<h4>触ってみる</h4>
<NavLink
id="wallet"
href="https://ethereum.org/ja/wallets/find-wallet/"
text="ウォレットを用意"
/>
<NavLink
id="exchange"
href="https://ethereum.org/ja/get-eth/"
text="ETHを入手"
/>
<NavLink id="wallet" href="https://ethereum.org/ja/wallets/find-wallet/" text="ウォレットを用意" />
<NavLink id="exchange" href="https://ethereum.org/ja/get-eth/" text="ETHを入手" />
</section>

<section id="learn_ethereum">
<h4>理解する</h4>
<NavLink
id="whitepaper"
href="https://ethereum.org/en/whitepaper/"
text="Ethereum Whitepaper"
/>
<NavLink id="whitepaper" href="https://ethereum.org/en/whitepaper/" text="Ethereum Whitepaper" />
</section>

<section id="develop_on_ethereum">
<h4>開発する</h4>
<NavLink
id="documentation"
href="https://ethereum.org/ja/developers/docs/"
text="開発ドキュメント"
/>
<NavLink id="documentation" href="https://ethereum.org/ja/developers/docs/" text="開発ドキュメント" />
</section>

<section id="ethereum_ecosystem">
<h4>参加する</h4>
<NavLink id="participate" href="/about/joinus/" text="メンバー募集" />

<NavLink
id="participate"
href="https://ethereum.org/ja/community/get-involved/"
text="いろんな関わり方"
/>
<NavLink
id="online"
href="https://ethereum.org/ja/community/online/"
text="オンラインコミュニティ"
/>
<NavLink id="participate" href="https://ethereum.org/ja/community/get-involved/" text="いろんな関わり方" />
<NavLink id="online" href="https://ethereum.org/ja/community/online/" text="オンラインコミュニティ" />
</section>

<section id="for_enterprise">
Expand All @@ -94,11 +70,7 @@ export const BottomMenu = () => {
<section id="about_ethereum_jp">
<h4>Ethereum Japanについて</h4>
<NavLink id="about" href="/about" text="Ethereum Japanとは" />
<NavLink
id="discord"
href="https://discord.gg/Tm5jU3DSCE"
text="EJ Discord"
/>
<NavLink id="discord" href="https://discord.gg/Tm5jU3DSCE" text="EJ Discord" />
</section>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BottomMenu } from "./BottomMenu";
import { Socials } from "./Socials";

import { css } from "@emotion/react";
import { FC } from "react";
import type { FC } from "react";

const Footer: FC<ComponentProps> = ({ children }) => {
const footerStyle = css`
Expand Down
36 changes: 8 additions & 28 deletions src/components/forms/ContactForm.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import { css } from "@emotion/react";
import SendIcon from "@mui/icons-material/Send";
import {
Alert,
Button,
TextField,
ThemeProvider,
createTheme,
} from "@mui/material";
import { Alert, Button, TextField, ThemeProvider, createTheme } from "@mui/material";
import { useRouter } from "next/router";
import { FC, useState } from "react";
import { Controller, SubmitHandler, useForm } from "react-hook-form";
import { type FC, useState } from "react";
import { Controller, type SubmitHandler, useForm } from "react-hook-form";

import { useLocale } from "@/hooks/useLocale";

Expand Down Expand Up @@ -145,9 +139,7 @@ const ContactForm: FC = () => {
required: "Your organization is required",
})}
error={!!errors.organization}
helperText={
errors?.organization ? errors.organization.message : "\u00a0"
}
helperText={errors?.organization ? errors.organization.message : "\u00a0"}
{...field}
/>
)}
Expand Down Expand Up @@ -182,8 +174,7 @@ const ContactForm: FC = () => {
label={t.FORM.WALLET}
disabled={!!sendStatus}
{...register("wallet", {
required:
"Your Ethereum address is required (`0x...` or ENS)",
required: "Your Ethereum address is required (`0x...` or ENS)",
})}
error={!!errors.wallet}
helperText={errors?.wallet ? errors.wallet.message : "\u00a0"}
Expand All @@ -206,8 +197,7 @@ const ContactForm: FC = () => {
required: "Your inquiry is required",
maxLength: {
value: 2000,
message:
"Your inquiry must be 2000 characters or fewer in length.",
message: "Your inquiry must be 2000 characters or fewer in length.",
},
})}
error={!!errors.inquiry}
Expand All @@ -224,18 +214,8 @@ const ContactForm: FC = () => {
margin-right: auto;
`}
>
<Button
endIcon={<SendIcon />}
type="submit"
variant="outlined"
color="inherit"
disabled={!!sendStatus}
>
{sendStatus
? sendStatus === 2
? "Submitted"
: "Submitting"
: "Send"}
<Button endIcon={<SendIcon />} type="submit" variant="outlined" color="inherit" disabled={!!sendStatus}>
{sendStatus ? (sendStatus === 2 ? "Submitted" : "Submitting") : "Send"}
</Button>
</div>
</form>
Expand Down
56 changes: 11 additions & 45 deletions src/components/forms/ContactForm_dangerous.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import { css } from "@emotion/react";
import SendIcon from "@mui/icons-material/Send";
import {
Alert,
Button,
TextField,
ThemeProvider,
createTheme,
} from "@mui/material";
import { Alert, Button, TextField, ThemeProvider, createTheme } from "@mui/material";
import { useRouter } from "next/router";
import { FC, useState } from "react";
import { Controller, SubmitHandler, useForm } from "react-hook-form";
import { type FC, useState } from "react";
import { Controller, type SubmitHandler, useForm } from "react-hook-form";

import { useLocale } from "@/hooks/useLocale";
import { table_websiteInquiry } from "@/utils/formObject";
Expand Down Expand Up @@ -75,13 +69,7 @@ const ContactFormDangerous: FC = () => {
setSendStatus(3);
throw new Error("Invalid name. (min 3 char, max 30 char)");
}
if (
!(
typeof organization === "string" &&
2 < organization.length &&
organization.length < 31
)
) {
if (!(typeof organization === "string" && 2 < organization.length && organization.length < 31)) {
setSendStatus(3);
throw new Error("Invalid organization. (min 3 char, max 30 char)");
}
Expand All @@ -93,13 +81,7 @@ const ContactFormDangerous: FC = () => {
setSendStatus(3);
throw new Error("Invalid wallet address.");
}
if (
!(
typeof inquiry === "string" &&
29 < inquiry.length &&
inquiry.length < 2001
)
) {
if (!(typeof inquiry === "string" && 29 < inquiry.length && inquiry.length < 2001)) {
setSendStatus(3);
throw new Error("Invalid inquiry. (min 30 char, max 2000 char)");
}
Expand All @@ -115,9 +97,7 @@ const ContactFormDangerous: FC = () => {
});
} catch (err) {
setSendStatus(3);
throw new Error(
`Failed${err instanceof AirtableError ? `: ${err.message}` : ""} 😕`,
);
throw new Error(`Failed${err instanceof AirtableError ? `: ${err.message}` : ""} 😕`);
}
}
};
Expand Down Expand Up @@ -204,9 +184,7 @@ const ContactFormDangerous: FC = () => {
required: "Your organization is required",
})}
error={!!errors.organization}
helperText={
errors?.organization ? errors.organization.message : "\u00a0"
}
helperText={errors?.organization ? errors.organization.message : "\u00a0"}
{...field}
/>
)}
Expand Down Expand Up @@ -241,8 +219,7 @@ const ContactFormDangerous: FC = () => {
label={t.FORM.WALLET}
disabled={!!sendStatus}
{...register("wallet", {
required:
"Your Ethereum address is required (`0x...` or ENS)",
required: "Your Ethereum address is required (`0x...` or ENS)",
})}
error={!!errors.wallet}
helperText={errors?.wallet ? errors.wallet.message : "\u00a0"}
Expand All @@ -265,8 +242,7 @@ const ContactFormDangerous: FC = () => {
required: "Your inquiry is required",
maxLength: {
value: 2000,
message:
"Your inquiry must be 2000 characters or fewer in length.",
message: "Your inquiry must be 2000 characters or fewer in length.",
},
})}
error={!!errors.inquiry}
Expand All @@ -283,18 +259,8 @@ const ContactFormDangerous: FC = () => {
margin-right: auto;
`}
>
<Button
endIcon={<SendIcon />}
type="submit"
variant="outlined"
color="inherit"
disabled={!!sendStatus}
>
{sendStatus
? sendStatus === 2
? "Submitted"
: "Submitting"
: "Send"}
<Button endIcon={<SendIcon />} type="submit" variant="outlined" color="inherit" disabled={!!sendStatus}>
{sendStatus ? (sendStatus === 2 ? "Submitted" : "Submitting") : "Send"}
</Button>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/Glyph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ethjp_logo from "/public/logo/ej.png";
import { css } from "@emotion/react";
import Image from "next/image";
import Link from "next/link";
import { FC } from "react";
import type { FC } from "react";

export const Glyph: FC = () => {
const glyphStyle = css`
Expand Down
9 changes: 2 additions & 7 deletions src/components/header/NavMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ export const NavMenu: FC = () => {
newpage?: boolean;
}> = ({ id, href, text, bold, newpage }) => {
return (
<Link
id={id}
href={href}
passHref={true}
target={newpage ? "_blank" : "_self"}
css={menuLinkStyle}
>
<Link id={id} href={href} passHref={true} target={newpage ? "_blank" : "_self"} css={menuLinkStyle}>
{text}
</Link>
);
Expand All @@ -125,6 +119,7 @@ export const NavMenu: FC = () => {
ETHTokyo
</a> */}
<MenuItem id="events" href="/event" text="Events" />
<MenuItem id="news" href="/news" text="News" />
<MenuItem id="contact" href="/contact" text="Contact" />
<MenuItem id="about" href="/about" text="About Us" />
</div>
Expand Down
Loading