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 #360 from suzuka-kosen-festa/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kobapi28 authored Oct 26, 2022
2 parents 920e324 + eb1273c commit 39de171
Show file tree
Hide file tree
Showing 27 changed files with 957 additions and 56 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
"@testing-library/user-event": "14.4.3",
"@types/google.maps": "3.50.4",
"@types/gtag.js": "0.0.12",
"@types/node": "18.11.5",
"@types/node": "18.11.6",
"@types/react": "18.0.23",
"@types/react-dom": "18.0.7",
"@types/tailwindcss": "3.0.11",
"@typescript-eslint/eslint-plugin": "5.41.0",
"@typescript-eslint/parser": "5.41.0",
"@vitejs/plugin-react": "2.1.0",
"@vitejs/plugin-react": "2.2.0",
"@vitest/ui": "0.24.3",
"autoprefixer": "10.4.12",
"babel-loader": "8.2.5",
Expand All @@ -101,7 +101,7 @@
"terser": "5.15.1",
"token-transformer": "0.0.27",
"typescript": "4.8.4",
"vite": "3.1.8",
"vite": "3.2.0",
"vite-plugin-pwa": "0.13.1",
"vitest": "0.24.3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/api/liveevent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { LiveEvent, LiveStage } from "./prisma";

export type SeparationEventList = {
[key in LiveStage]: ReadonlyArray<LiveEvent> | readonly [];
};
} & { interval: EventInterval };

export type EventInterval = {
[key in LiveStage]: ReadonlyArray<number>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ exports[`(components) molecules/hamburger-menu > take snap shot 1`] = `
>
<a
class="css-xddjtl-Mock"
href="/timetable"
href="/timetable?select=30"
>
Schedule
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const args: ComponentPropsWithoutRef<T> = {
name: "Members",
},
{
link: "/timetable",
link: "/timetable?select=30",
color: tw`text-primary-green`,
name: "Schedule",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const headerLinks = [
name: "Members",
},
{
link: "/timetable",
link: "/timetable?select=30",
color: tw`text-primary-green`,
name: "Schedule",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exports[`(components) organisms/header > take snap shot 1`] = `
>
<a
class="css-dgtzi5-LinkItem"
href="/timetable"
href="/timetable?select=30"
>
Schedule
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/header/header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const args: ComponentPropsWithoutRef<T> = {
name: "Members",
},
{
link: "/timetable",
link: "/timetable?select=30",
color: tw`text-primary-green`,
name: "Schedule",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports[`(components) organisms/layout > take snap shot 1`] = `
>
<a
class="css-dgtzi5-LinkItem"
href="/timetable"
href="/timetable?select=30"
>
Schedule
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const lists = [
name: "Members",
},
{
link: "/timetable",
link: "/timetable?select=30",
color: tw`text-primary-green`,
name: "Schedule",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ exports[`(components) organisms/pickup-section > take snap shot 1`] = `
</ul>
<a
class="css-3os8bq-Button"
href="/timetable"
href="/timetable?select=30"
role="button"
tabindex="0"
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/organisms/pickup-section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const PickupSection: FC<PickupSectionProperties> = ({ title, buttonText, events,
</Heading>
<CardList>
{events.map(event => (
<PickupCard event={event} key={event.id} />
<PickupCard event={event} key={event.title} />
))}
</CardList>
<Link to="/timetable">
<Link to="/timetable?select=30">
<Button colorKey="green" as="a" role="button">
{buttonText}
</Button>
Expand Down
10 changes: 5 additions & 5 deletions src/components/organisms/time-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ const TimeTableAxis: FC<TimeTableAxisProperties> = ({ axes }) => (
</section>
);

const TimeTable: FC<TimeTableProperties> = ({ events, intervals }) => (
const TimeTable: FC<TimeTableProperties> = ({ events }) => (
<section aria-label="Time table" css={tw`grid grid-cols-timetable gap-1 lg:gap-10`}>
<TimeTableAxis axes={["09:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00"]} />
<TimeTableColumn events={events.main} intervals={intervals.main} stage="main" />
<TimeTableColumn events={events.sub} intervals={intervals.sub} stage="sub" />
<TimeTableColumn events={events.live} intervals={intervals.live} stage="live" />
<TimeTableColumn events={events.game} intervals={intervals.game} stage="game" />
<TimeTableColumn events={events.main} intervals={events.interval.main} stage="main" />
<TimeTableColumn events={events.sub} intervals={events.interval.sub} stage="sub" />
<TimeTableColumn events={events.live} intervals={events.interval.live} stage="live" />
<TimeTableColumn events={events.game} intervals={events.interval.game} stage="game" />
</section>
);

Expand Down
18 changes: 6 additions & 12 deletions src/components/organisms/time-table/time-table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ const args: ComponentPropsWithoutRef<T> = {
stage: "game",
},
],
},
intervals: {
main: [2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 3, 5],
sub: [2, 6, 2, 2, 2, 8, 2, 3, 1],
live: [10, 2, 1, 2, 1, 2, 1, 2, 7],
game: [2, 17, 9],
interval: {
main: [2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 3, 5],
sub: [2, 6, 2, 2, 2, 8, 2, 3, 1],
live: [10, 2, 1, 2, 1, 2, 1, 2, 7],
game: [2, 17, 9],
},
},
};

Expand All @@ -219,12 +219,6 @@ export default {
type: "array",
},
},
intervals: {
description: "Intervals of table",
control: {
type: "array",
},
},
},
component: TimeTable,
} as Meta;
Expand Down
3 changes: 1 addition & 2 deletions src/components/organisms/time-table/types/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SeparationEventList, EventInterval } from "../../../../api/liveevent";
import type { SeparationEventList } from "../../../../api/liveevent";
import type { LiveEvent, LiveStage } from "../../../../api/prisma";

export type TimetableHeadProperties = {
Expand All @@ -17,5 +17,4 @@ export type TimeTableAxisProperties = {

export type TimeTableProperties = {
events: SeparationEventList;
intervals: EventInterval;
};
Loading

0 comments on commit 39de171

Please sign in to comment.