diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..3d85ec33 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +src/__generated__ \ No newline at end of file diff --git a/.github/workflows/AutomaticAssignReviewer.yml b/.github/workflows/AutomaticAssignReviewer.yml new file mode 100644 index 00000000..79345350 --- /dev/null +++ b/.github/workflows/AutomaticAssignReviewer.yml @@ -0,0 +1,14 @@ +name: Review Assign + +on: + pull_request: + types: [opened, ready_for_review] + +jobs: + assign: + runs-on: ubuntu-latest + steps: + - uses: hkusu/review-assign-action@v1 + with: + assignees: ${{ github.actor }} # assign pull request author + reviewers: 100Gyeon, na-reum, eunsukimme, borimong # if draft, assigned when draft is released diff --git a/.gitignore b/.gitignore index 89b293a6..0eb1cd16 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,7 @@ yarn-error.log* next-env.d.ts # vscode -.vscode/ \ No newline at end of file +.vscode/ + +# __generated__ +src/__generated__/open-api-specification.json \ No newline at end of file diff --git a/.storybook/main.ts b/.storybook/main.ts index fb59deba..a7b203ba 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,4 +1,5 @@ import type { StorybookConfig } from '@storybook/nextjs'; + const config: StorybookConfig = { stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'], @@ -9,5 +10,34 @@ const config: StorybookConfig = { docs: { autodocs: 'tag', }, + webpackFinal(config) { + const imageRule = config.module!.rules!.find((rule) => { + if (rule && typeof rule !== 'string' && rule.test instanceof RegExp) { + return rule.test.test('.svg') + } + }) + if (imageRule && typeof imageRule !== 'string') { + imageRule.exclude = /\.svg$/ + } + + config.module!.rules!.push({ + test: /\.svg$/, + oneOf: [ + { + resourceQuery: /rect/, + use: { + loader: '@svgr/webpack', + options: { + svgo: false, + }, + }, + }, + { + use: '@svgr/webpack', + }, + ], + }) + return config; + }, }; export default config; diff --git a/.storybook/preview.ts b/.storybook/preview.tsx similarity index 64% rename from .storybook/preview.ts rename to .storybook/preview.tsx index 145f38bc..eca38681 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.tsx @@ -1,4 +1,7 @@ import type { Preview } from '@storybook/react'; +import { OverlayProvider } from '../src/hooks/useOverlay/OverlayProvider'; +import React from 'react'; +import '../styles/globals.css' const preview: Preview = { parameters: { @@ -19,6 +22,13 @@ const preview: Preview = { }, }, }, + decorators: [ + (Story) => ( + + + + ), + ], }; export default preview; diff --git a/README.md b/README.md index 3a1d9cb9..499c379b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SOPT Crew Product +# SOPT Crew Product > SOPT 구성원들이 하나로 모일 수 있는 모임 서비스 diff --git a/next.config.js b/next.config.js index 666716a8..f5474f33 100644 --- a/next.config.js +++ b/next.config.js @@ -17,6 +17,27 @@ const nextConfig = { }, }, }, + { + resourceQuery: /v2/, // *.svg?v2 + use: { + loader: '@svgr/webpack', + options: { + svgo: true, + svgoConfig: { + plugins: [ + { + name: 'preset-default', + params: { + overrides: { + removeViewBox: false, + }, + }, + }, + ], + }, + }, + }, + }, { use: '@svgr/webpack', }, diff --git a/package.json b/package.json index 3be5befd..90bdacdf 100644 --- a/package.json +++ b/package.json @@ -11,19 +11,23 @@ "wrangler": "wrangler", "where": "sh -c 'export IP=`ipconfig getifaddr en0` && echo [info] we are in ... http://${IP}:3000'", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "generate-types": "openapi-typescript ./src/__generated__/open-api-specification.json -o ./src/__generated__/schema.d.ts" }, "dependencies": { "@headlessui/react": "^1.7.3", "@hookform/resolvers": "^2.9.10", "@sentry/nextjs": "^7.51.0", - "@sopt-makers/playground-common": "^1.2.0", + "@sopt-makers/colors": "^1.0.0", + "@sopt-makers/playground-common": "^1.2.2", "@stitches/react": "^1.2.8", "@tanstack/react-query": "^4.10.3", "axios": "^1.1.3", "dayjs": "^1.11.6", + "embla-carousel-react": "^8.0.0-rc13", "nanoid": "^4.0.0", "next": "12.3.1", + "openapi-fetch": "^0.7.1", "react": "18.2.0", "react-dom": "18.2.0", "react-hook-form": "^7.39.1", @@ -56,6 +60,7 @@ "eslint-plugin-react": "^7.31.10", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "^0.6.12", + "openapi-typescript": "^6.3.9", "prettier": "^2.7.1", "storybook": "^7.0.23", "typescript": "4.8.4", diff --git a/pages/_app.tsx b/pages/_app.tsx index e713d009..148a419e 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,5 +1,4 @@ import type { AppProps } from 'next/app'; -import Head from 'next/head'; import Script from 'next/script'; import { useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; @@ -14,6 +13,8 @@ import Loader from '@components/loader/Loader'; import ChannelService from '@utils/ChannelService'; import { api, playgroundApi } from '@api/index'; import { fetchMyProfile } from '@api/user'; +import { OverlayProvider } from '@hooks/useOverlay/OverlayProvider'; +import SEO from '@components/seo/SEO'; function MyApp({ Component, pageProps }: AppProps) { const [queryClient] = React.useState(() => new QueryClient()); @@ -74,9 +75,7 @@ function MyApp({ Component, pageProps }: AppProps) { return ( - - SOPT Playground - +