Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #372 from suzuka-kosen-festa/dev
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
re-taro authored Oct 28, 2022
2 parents 9f6912f + ce67ff7 commit 612ee98
Show file tree
Hide file tree
Showing 19 changed files with 750 additions and 1,198 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpage",
"version": "2.0.0-rc",
"version": "2.0.0",
"description": "第57回鈴鹿高専祭 公式HP",
"repository": {
"type": "git",
Expand Down Expand Up @@ -28,9 +28,9 @@
"chromatic": "npx chromatic --project-token=YOUR_TOKEN"
},
"dependencies": {
"@emotion/cache": "11.10.3",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"@emotion/cache": "11.10.5",
"@emotion/react": "11.10.5",
"@emotion/styled": "11.10.5",
"@iconify/react": "4.0.0",
"@popperjs/core": "2.11.6",
"axios": "1.1.3",
Expand All @@ -47,8 +47,8 @@
"@babel/core": "7.19.6",
"@babel/plugin-transform-react-jsx": "7.19.0",
"@emotion/babel-plugin-jsx-pragmatic": "0.2.0",
"@emotion/css": "11.10.0",
"@emotion/serialize": "1.1.0",
"@emotion/css": "11.10.5",
"@emotion/serialize": "1.1.1",
"@emotion/server": "11.10.0",
"@mdx-js/react": "2.1.5",
"@storybook/addon-a11y": "6.5.13",
Expand All @@ -58,7 +58,7 @@
"@storybook/addon-interactions": "6.5.13",
"@storybook/addon-links": "6.5.13",
"@storybook/addon-postcss": "2.0.0",
"@storybook/builder-vite": "0.2.4",
"@storybook/builder-vite": "0.2.5",
"@storybook/react": "6.5.13",
"@storybook/testing-library": "0.0.13",
"@storybook/testing-react": "1.3.0",
Expand All @@ -68,18 +68,18 @@
"@testing-library/user-event": "14.4.3",
"@types/google.maps": "3.50.4",
"@types/gtag.js": "0.0.12",
"@types/node": "18.11.6",
"@types/react": "18.0.23",
"@types/react-dom": "18.0.7",
"@types/node": "18.11.7",
"@types/react": "18.0.24",
"@types/react-dom": "18.0.8",
"@types/tailwindcss": "3.0.11",
"@typescript-eslint/eslint-plugin": "5.41.0",
"@typescript-eslint/parser": "5.41.0",
"@vitejs/plugin-react": "2.2.0",
"@vitest/ui": "0.24.3",
"autoprefixer": "10.4.12",
"babel-loader": "8.2.5",
"autoprefixer": "10.4.13",
"babel-loader": "9.0.0",
"babel-plugin-macros": "3.1.0",
"chromatic": "6.11.1",
"chromatic": "6.11.2",
"cross-env": "7.0.3",
"eslint": "8.26.0",
"eslint-config-airbnb": "19.0.4",
Expand Down
Binary file added public/statics/members/amon_kitayama.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/atoms/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`(components) atoms/icon > take snap shot 1`] = `
<div>
<div
class="css-1vlcokg"
class="css-qitdt8"
>
<span />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { memo } from "react";
import tw from "twin.macro";
import type { IconProperties } from "./types/model";

const IconBox = tw.div`flex items-center justify-center flex-shrink-0 w-6 h-6 sm:(w-12 h-12) min-h-full`;
const IconBox = tw.div`inline-flex items-center justify-center flex-shrink-0 w-6 h-6 sm:(w-12 h-12) min-h-full`;

const Icon = <T extends AnyComponent>({ icon, iconStyles, as, ...rest }: IconProperties<T>): JSX.Element => (
<IconBox as={as} {...rest}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Vitest Snapshot v1

exports[`(components) molecules/twitter > take snap shot 1`] = `
exports[`(components) molecules/caution > take snap shot 1`] = `
<div>
<section
aria-label="注意事項"
Expand All @@ -11,7 +11,7 @@ exports[`(components) molecules/twitter > take snap shot 1`] = `
class="css-1m7spai"
>
<div
class="css-1vlcokg"
class="css-qitdt8"
>
<span />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/caution/caution.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const options = {
name: "注意事項",
};

describe("(components) molecules/twitter", () => {
describe("(components) molecules/caution", () => {
test("to be molecules", () => {
const { container } = render(<Default />);
expect(container).toBeMolecule();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ exports[`(components) molecules/time-table-row > take snap shot 1`] = `
EXBALLON
</p>
</li>
<div />
</ul>
</div>
`;
16 changes: 14 additions & 2 deletions src/components/molecules/time-table-row/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@ const TimeTableRow: FC<TimeTableRowProperties> = ({ events, intervals, stage })
if (i === 0) {
return dayjs(event.start_time).format("HH:mm") === "09:00" ? arr.push(event) : arr.push("gap", event);
}
if (events.length - 1 === i) {
return dayjs(event.end_time).format("HH:mm") === "16:00" ? arr.push(event) : arr.push("gap", event);
if (i === a.length - 1) {
/* eslint-disable no-nested-ternary */
return dayjs(a[i - 1].end_time).format("HH:mm") === dayjs(a[i].start_time).format("HH:mm") &&
dayjs(event.end_time).format("HH:mm") === "16:00"
? arr.push(event)
: dayjs(a[i - 1].end_time).format("HH:mm") === dayjs(a[i].start_time).format("HH:mm")
? arr.push(event, "gap")
: dayjs(event.end_time).format("HH:mm") === "16:00"
? arr.push("gap", event)
: arr.push("gap", event, "gap");
/* eslint-enable no-nested-ternary */
}
if (i === a.length - 1) {
return dayjs(event.end_time).format("HH:mm") === "16:00" ? arr.push(event) : arr.push(event, "gap");
}
return dayjs(a[i - 1].end_time).format("HH:mm") === dayjs(a[i].start_time).format("HH:mm")
? arr.push(event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`(components) organisms/bazaar-section > take snap shot 1`] = `
class="css-1m7spai"
>
<div
class="css-1vlcokg"
class="css-qitdt8"
>
<span />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ exports[`(components) organisms/sns-section > take snap shot 1`] = `
class="css-yczkn0"
>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://twitter.com/KOSENFESTA"
rel="noopener noreferrer"
target="_blank"
>
<span />
</a>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://www.instagram.com/kosenfesta/"
rel="noopener noreferrer"
target="_blank"
>
<span />
</a>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://www.youtube.com/channel/UCV4zdsdagV2N3juHRz2dqQQ"
rel="noopener noreferrer"
target="_blank"
>
<span />
</a>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://open.spotify.com/show/4n0D0dsaFaPbJTz7tGpfTR?si=8yZ1H8LzTM-ZJPyYN6CU-A"
rel="noopener noreferrer"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ exports[`(components) organisms/time-table > take snap shot 1`] = `
EXBALLON
</p>
</li>
<div />
</ul>
</section>
<section
Expand Down Expand Up @@ -349,6 +350,7 @@ exports[`(components) organisms/time-table > take snap shot 1`] = `
出張Radio
</p>
</li>
<div />
</ul>
</section>
<section
Expand Down Expand Up @@ -452,6 +454,7 @@ exports[`(components) organisms/time-table > take snap shot 1`] = `
あどばん
</p>
</li>
<div />
</ul>
</section>
<section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ exports[`(components) templates/time-table > take snap shot 1`] = `
EXBALLON
</p>
</li>
<div />
</ul>
</section>
<section
Expand Down Expand Up @@ -397,6 +398,7 @@ exports[`(components) templates/time-table > take snap shot 1`] = `
出張Radio
</p>
</li>
<div />
</ul>
</section>
<section
Expand Down Expand Up @@ -500,6 +502,7 @@ exports[`(components) templates/time-table > take snap shot 1`] = `
あどばん
</p>
</li>
<div />
</ul>
</section>
<section
Expand Down
12 changes: 6 additions & 6 deletions src/components/templates/top/__snapshots__/top.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`(components) templates/top > take snap shot 1`] = `
class="css-1m7spai"
>
<div
class="css-1vlcokg"
class="css-qitdt8"
>
<span />
</div>
Expand Down Expand Up @@ -191,31 +191,31 @@ exports[`(components) templates/top > take snap shot 1`] = `
class="css-yczkn0"
>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://twitter.com/KOSENFESTA"
rel="noopener noreferrer"
target="_blank"
>
<span />
</a>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://www.instagram.com/kosenfesta/"
rel="noopener noreferrer"
target="_blank"
>
<span />
</a>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://www.youtube.com/channel/UCV4zdsdagV2N3juHRz2dqQQ"
rel="noopener noreferrer"
target="_blank"
>
<span />
</a>
<a
class="css-9uxhpu-SnsSection"
class="css-2cdkd3-SnsSection"
href="https://open.spotify.com/show/4n0D0dsaFaPbJTz7tGpfTR?si=8yZ1H8LzTM-ZJPyYN6CU-A"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -388,7 +388,7 @@ exports[`(components) templates/top > take snap shot 1`] = `
class="css-1m7spai"
>
<div
class="css-1vlcokg"
class="css-qitdt8"
>
<span />
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/constants/members/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const members: ReadonlyArray<MemberCardProperties> = [
imagePath: "/statics/members/akinori_asai.webp",
name: "Akinori Asai",
},
{
imagePath: "/statics/members/amon_kitayama.webp",
name: "Amon Kitayama",
},
{
imagePath: "/statics/members/ayaka_ito.webp",
name: "Ayaka Ito",
Expand Down
21 changes: 0 additions & 21 deletions src/hooks/useJwt/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/hooks/useKeyPress/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const useKeyPress = (key: string, handler: () => void): void => {
useEffect(() => {
savedHandler.current = handler;
}, [handler]);

useEffect(() => {
const onKeyup = (event: KeyboardEvent) => {
if (event.key === key) {
Expand Down
7 changes: 1 addition & 6 deletions src/libs/axios/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ const ax = axios.create({
baseURL: import.meta.env.VITE_API_URL,
headers: {
"Content-type": "application/json",
Authorization: `Bearer ${window.localStorage.getItem("tk")}`,
},
});

const auth = axios.create({
baseURL: import.meta.env.VITE_API_URL,
});

const fetcher = (url: string) => ax.get(url).then(res => res.data);

export { ax, auth, fetcher };
export { ax, fetcher };
2 changes: 0 additions & 2 deletions src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import { useRegisterSW } from "virtual:pwa-register/react";
import { Route, Switch } from "wouter";
import { TopPage, SponsorPage, BazaarPage, MemberPage, NotFoundPage, TimeTablePage } from "./pages";
import { useScrollToTop } from "./hooks/useScrollToTop";
import { useJwt } from "./hooks/useJwt";

const Router: FC = () => {
useRegisterSW();
useScrollToTop();
useJwt();
return (
<Switch>
<Route path="/" component={TopPage} />
Expand Down
Loading

0 comments on commit 612ee98

Please sign in to comment.