diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..cffe8cde --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +save-exact=true diff --git a/package.json b/package.json index 33824f11..9a7a4055 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,14 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-i18next": "11.18.6", - "react-rewards": "^2.0.4", + "react-rewards": "2.0.4", "swr": "2.0.3", - "use-local-storage-state": "18.1.1" + "use-local-storage-state": "18.1.1", + "zod": "3.21.4" }, "devDependencies": { "@babel/core": "7.19.3", + "@faker-js/faker": "7.6.0", "@storybook/addon-actions": "6.5.12", "@storybook/addon-essentials": "6.5.12", "@storybook/addon-interactions": "6.5.12", @@ -48,8 +50,8 @@ "lint-staged": "13.0.3", "prettier": "2.7.1", "storybook-addon-material-ui5": "1.0.0", - "storybook-addon-next": "^1.6.9", - "typescript": "4.8.2" + "storybook-addon-next": "1.6.9", + "typescript": "4.9.5" }, "lint-staged": { "*.{ts,tsx}": [ diff --git a/src/components/molecules/PlenumCard/PlenumCard.stories.tsx b/src/components/molecules/PlenumCard/PlenumCard.stories.tsx new file mode 100644 index 00000000..5c964d35 --- /dev/null +++ b/src/components/molecules/PlenumCard/PlenumCard.stories.tsx @@ -0,0 +1,19 @@ +import type { ComponentMeta, ComponentStory } from '@storybook/react' +import { PlenumCard } from '.' +import { Box } from '@mui/material' + +const meta: ComponentMeta = { + component: PlenumCard +} +export default meta + +const Template: ComponentStory = args => ( + + + +) + +export const Default = Template.bind({}) +Default.args = { + title: 'Break' +} diff --git a/src/components/molecules/PlenumCard/index.tsx b/src/components/molecules/PlenumCard/index.tsx new file mode 100644 index 00000000..736098bb --- /dev/null +++ b/src/components/molecules/PlenumCard/index.tsx @@ -0,0 +1,22 @@ +import { Typography, Box } from '@mui/material' +import { Colors } from 'src/styles/color' + +export interface PlenumCardProps { + title: string +} + +export const PlenumCard = ({ title }: PlenumCardProps) => { + return ( + + {title} + + ) +} diff --git a/src/components/molecules/TrackCard/TrackCard.stories.tsx b/src/components/molecules/TrackCard/TrackCard.stories.tsx new file mode 100644 index 00000000..2a842fed --- /dev/null +++ b/src/components/molecules/TrackCard/TrackCard.stories.tsx @@ -0,0 +1,36 @@ +import type { ComponentMeta, ComponentStory } from '@storybook/react' +import { faker } from '@faker-js/faker' +import { TrackCard } from '.' +import { Box } from '@mui/material' +import { Colors } from 'src/styles/color' + +const meta: ComponentMeta = { + component: TrackCard +} +export default meta + +const Template: ComponentStory = args => ( + + + +) + +export const Default = Template.bind({}) +Default.args = { + id: 'A1-1', + title: faker.lorem.paragraph(), + minute: 20, + speaker: faker.name.fullName(), + speakerIcon: faker.image.avatar() +} + +export const Green = Template.bind({}) +Green.args = { + id: 'A1-1', + title: faker.lorem.paragraph(), + minute: 20, + speaker: faker.name.fullName(), + speakerIcon: faker.image.avatar(), + color: Colors.background.secondary_green, + idColor: Colors.background.primary_green +} diff --git a/src/components/molecules/TrackCard/index.tsx b/src/components/molecules/TrackCard/index.tsx new file mode 100644 index 00000000..416f48fa --- /dev/null +++ b/src/components/molecules/TrackCard/index.tsx @@ -0,0 +1,63 @@ +import { Typography, Box } from '@mui/material' +import { Colors } from 'src/styles/color' +import Image, { StaticImageData } from 'next/image' + +export interface TrackCardProps { + id: string + title: string + minute: number + speaker: string + speakerIcon: string | StaticImageData + color?: string + idColor?: string +} + +export const TrackCard = ({ + id, + title, + minute, + speaker, + speakerIcon, + color = Colors.background.secondary_pink, + idColor = Colors.background.primary_pink +}: TrackCardProps) => { + return ( + + + + {id} + + + + {title} + + + + {`${speaker}'s + + + {speaker} + + + ({minute}min) + + + + ) +} diff --git a/src/components/organisms/SponsorsSection/index.tsx b/src/components/organisms/SponsorsSection/index.tsx index 25b6c9b0..d1069e77 100644 --- a/src/components/organisms/SponsorsSection/index.tsx +++ b/src/components/organisms/SponsorsSection/index.tsx @@ -1,8 +1,6 @@ import type { FC } from 'react' -import Link from 'next/link' import { Box, Typography } from '@mui/material' -import { Button } from 'src/components/atoms' -import { useTranslation } from 'react-i18next' +import { Trans, useTranslation } from 'react-i18next' import { Colors, confettiColors } from 'src/styles/color' import { GopherConductor, @@ -40,9 +38,11 @@ export const SponsorsSection: FC = () => { Sponsors - {/* TODO: This description will be changed as soon as the official wording is fixed. */} - - {t('sponsors_description')} + + {/* NOTE: Hide SponsorsCard until the top level sponsors has fixed. @@ -51,47 +51,22 @@ export const SponsorsSection: FC = () => { */} - + + gopher conductor + gopher drummer + gopher trumpeter + gopher pom pom + gopher flower blue {isTabletOrOver && ( - - gopher conductor - gopher drummer - gopher trumpeter - gopher pom pom - - )} - - -