Skip to content

Commit

Permalink
베이스 컴포넌트 위치 변경 (#454)
Browse files Browse the repository at this point in the history
* chore: Base 컴포넌트들을 v1 디렉터리 내부로 이동

* chore: 디렉터리명 대소문자 변경을 위한 더미 커밋

* chore: 디렉터리 대소문자 변경

* fix: 스토리북 빌드 에러 수정
  • Loading branch information
minjongbaek authored and gxxrxn committed Jun 17, 2024
1 parent 61ada97 commit fd8ad31
Show file tree
Hide file tree
Showing 56 changed files with 67 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Preview } from '@storybook/react';
import '@/styles/global.css';

import Layout from '../src/v1/layout/Layout';
import ToastProvider from '../src/ui/Base/Toast/ToastProvider';
import ToastProvider from '../src/v1/base/Toast/ToastProvider';

const preview: Preview = {
parameters: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/bookarchive/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Suspense } from 'react';
import useMounted from '@/hooks/useMounted';
import BookArchiveForAuth from '@/v1/bookArchive/BookArchiveForAuth';
import BookArchiveForUnAuth from '@/v1/bookArchive/BookArchiveForUnAuth';
import TopHeader from '@/ui/Base/TopHeader';
import TopHeader from '@/v1/base/TopHeader';

export default function BookArchivePage() {
return (
Expand Down
6 changes: 3 additions & 3 deletions src/app/bookshelf/[bookshelfId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { IconHeart, IconArrowLeft, IconShare, IconKakao } from '@public/icons';
import useToast from '@/ui/Base/Toast/useToast';
import useToast from '@/v1/base/Toast/useToast';
import useBookShelfBooksQuery from '@/queries/bookshelf/useBookShelfBookListQuery';
import useBookShelfInfoQuery from '@/queries/bookshelf/useBookShelfInfoQuery';
import {
Expand All @@ -11,8 +11,8 @@ import {

import { useEffect } from 'react';
import { useInView } from 'react-intersection-observer';
import Button from '@/ui/Base/Button';
import TopNavigation from '@/ui/Base/TopNavigation';
import Button from '@/v1/base/Button';
import TopNavigation from '@/v1/base/TopNavigation';
import BookShelfRow from '@/v1/bookShelf/BookShelfRow';
import { useRouter } from 'next/navigation';
import { isAuthed } from '@/utils/helpers';
Expand Down
2 changes: 1 addition & 1 deletion src/app/group/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import TopHeader from '@/ui/Base/TopHeader';
import TopHeader from '@/v1/base/TopHeader';
import SearchGroup from '@/v1/bookGroup/SearchGroup';
import SimpleBookGroupCard from '@/v1/bookGroup/SimpleBookGroupCard';
import DetailBookGroupCard from '@/v1/bookGroup/DetailBookGroupCard';
Expand Down
2 changes: 1 addition & 1 deletion src/app/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Loading from '@/ui/Base/Loading';
import Loading from '@/v1/base/Loading';

export default function RootLoading() {
return <Loading fullpage />;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ChakraThemeProvider from '@/components/ChakraThemeProvider';
import ReactQueryProvider from '@/components/ReactQueryProvider';
import { ReactNode } from 'react';
import ErrorPage from '@/app/error';
import ToastProvider from '@/ui/Base/Toast/ToastProvider';
import ToastProvider from '@/v1/base/Toast/ToastProvider';
import Layout from '@/v1/layout/Layout';

const ContextProvider = ({ children }: { children: ReactNode }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';

import Avatar from '@/ui/Base/Avatar';
import Avatar from '@/v1/base/Avatar';

const meta: Meta<typeof Avatar> = {
title: 'Base/Avatar',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Badge from '@/ui/Base/Badge';
import Badge from '@/v1/base/Badge';
import { IconHeart } from '@public/icons';
import { Meta, StoryObj } from '@storybook/react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BottomActionButton from '@/ui/Base/BottomActionButton';
import BottomActionButton from '@/v1/base/BottomActionButton';
import { Meta, StoryObj } from '@storybook/react';

const meta: Meta<typeof BottomActionButton> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';

import BottomNavigation from '@/ui/Base/BottomNavigation';
import BottomNavigation from '@/v1/base/BottomNavigation';

const meta: Meta<typeof BottomNavigation> = {
title: 'Base/BottomNavigation',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';

import { IconClose, IconKakao, LogoWithText } from '@public/icons';
import Button from '@/ui/Base/Button';
import BottomSheet from '@/ui/Base/BottomSheet';
import Button from '@/v1/base/Button';
import BottomSheet from '@/v1/base/BottomSheet';
import useDisclosure from '@/hooks/useDisclosure';

const meta: Meta<typeof BottomSheet> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';

import Button from '@/ui/Base/Button';
import Button from '@/v1/base/Button';

const meta: Meta<typeof Button> = {
title: 'Base/Button',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, StoryObj } from '@storybook/react';
import FloatingButton from '@/ui/Base/FloatingButton';
import FloatingButton from '@/v1/base/FloatingButton';

const meta: Meta<typeof FloatingButton> = {
title: 'Base/FloatingButton',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import Input from '@/ui/Base/Input';
import Button from '@/ui/Base/Button';
import Input from '@/v1/base/Input';
import Button from '@/v1/base/Button';
import { Control, SubmitHandler, useForm, useWatch } from 'react-hook-form';
import ErrorMessage from '@/ui/Base/ErrorMessage';
import ErrorMessage from '@/v1/base/ErrorMessage';

const meta: Meta<typeof Input> = {
title: 'Base/Input',
Expand Down Expand Up @@ -95,8 +95,7 @@ const Length = ({

return (
<div>
<span className={textColor}>{currentLength}</span>/
{maxLength}
<span className={textColor}>{currentLength}</span>/{maxLength}
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Meta, StoryObj } from '@storybook/react';
import { SubmitHandler, useForm } from 'react-hook-form';

import Button from '@/ui/Base/Button';
import Input from '@/ui/Base/Input';
import InputLength from '@/ui/Base/InputLength';
import ErrorMessage from '@/ui/Base/ErrorMessage';
import Button from '@/v1/base/Button';
import Input from '@/v1/base/Input';
import InputLength from '@/v1/base/InputLength';
import ErrorMessage from '@/v1/base/ErrorMessage';

const meta: Meta<typeof InputLength> = {
title: 'Base/InputLength',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, StoryObj } from '@storybook/react';
import Loading from '@/ui/Base/Loading';
import Loading from '@/v1/base/Loading';

const meta: Meta<typeof Loading> = {
title: 'Base/Loading',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, StoryObj } from '@storybook/react';
import Modal from '@/ui/Base/Modal';
import Modal from '@/v1/base/Modal';
import useDisclosure from '@/hooks/useDisclosure';
import Button from '@/ui/Base/Button';
import Button from '@/v1/base/Button';
import { Fragment } from 'react';

const meta: Meta<typeof Modal> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import { SubmitHandler, useForm } from 'react-hook-form';

import RadioButton from '@/ui/Base/RadioButton';
import Button from '@/ui/Base/Button';
import RadioButton from '@/v1/base/RadioButton';
import Button from '@/v1/base/Button';

const meta: Meta<typeof RadioButton> = {
title: 'Base/RadioButton',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import Select from '@/ui/Base/Select';
import Select from '@/v1/base/Select';
import { SubmitHandler, useForm } from 'react-hook-form';
import Button from '@/ui/Base/Button';
import ErrorMessage from '@/ui/Base/ErrorMessage';
import Button from '@/v1/base/Button';
import ErrorMessage from '@/v1/base/ErrorMessage';

const meta: Meta<typeof Select> = {
title: 'Base/Select',
Expand Down Expand Up @@ -54,7 +54,9 @@ const SelectWithUseForm = () => {
</Select.Option>
))}
</Select>
{errors.requiredNumber && <ErrorMessage>{errors.requiredNumber.message}</ErrorMessage>}
{errors.requiredNumber && (
<ErrorMessage>{errors.requiredNumber.message}</ErrorMessage>
)}
</div>
<div className="flex flex-col gap-[0.5rem]">
<Select
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import { SubmitHandler, useForm } from 'react-hook-form';

import Switch from '@/ui/Base/Switch';
import Button from '@/ui/Base/Button';
import Switch from '@/v1/base/Switch';
import Button from '@/v1/base/Button';

const meta: Meta<typeof Switch> = {
title: 'Base/Switch',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';

import Button from '@/ui/Base/Button';
import useToast from '@/ui/Base/Toast/useToast';
import ToastItem from '@/ui/Base/Toast/ToastItem';
import Button from '@/v1/base/Button';
import useToast from '@/v1/base/Toast/useToast';
import ToastItem from '@/v1/base/Toast/ToastItem';

const meta: Meta<typeof ToastItem> = {
title: 'Base/Toast',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/react';
import { IconHamburger } from '@public/icons';
import TopHeader from '@/ui/Base/TopHeader';
import TopHeader from '@/v1/base/TopHeader';

const meta: Meta<typeof TopHeader> = {
title: 'Base/TopHeader',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, StoryObj } from '@storybook/react';
import TopNavigation from '@/ui/Base/TopNavigation';
import TopNavigation from '@/v1/base/TopNavigation';
import {
IconPost,
IconShare,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createContext, ReactNode, useMemo, useState } from 'react';

import Portal from '@/ui/Base/Portal';
import Portal from '@/v1/base/Portal';

import ToastItem from './ToastItem';
import type { ToastController, ToastOption } from './types';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/v1/bookGroup/BookGroupNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { useRouter } from 'next/navigation';

import SSRSafeSuspense from '@/components/SSRSafeSuspense';
import TopNavigation from '@/ui/Base/TopNavigation';
import TopNavigation from '@/v1/base/TopNavigation';
import { IconArrowLeft, IconHamburger, IconPost } from '@public/icons';
import {
useBookGroupOwner,
Expand Down
2 changes: 1 addition & 1 deletion src/v1/bookGroup/BookGroupStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DdayStatus } from '@/types/dday';

import Badge from '@/ui/Base/Badge';
import Badge from '@/v1/base/Badge';
import { getDdayCount } from '@/utils/date';

const getDdayStatus = (ddayByStart: number, ddayByEnd: number) => {
Expand Down
4 changes: 2 additions & 2 deletions src/v1/bookGroup/DetailBookGroupCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Badge from '@/ui/Base/Badge';
import Avatar from '@/ui/Base/Avatar';
import Badge from '@/v1/base/Badge';
import Avatar from '@/v1/base/Avatar';
import { IconCalendar, IconMembers, IconComments } from '@public/icons';
import BookCover from '@/v1/book/BookCover';
import Link from 'next/link';
Expand Down
4 changes: 2 additions & 2 deletions src/v1/bookGroup/detail/BookGroupInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Link from 'next/link';

import { IconArrowLeft, IconCalendar, IconMembers } from '@public/icons';
import Badge from '@/ui/Base/Badge';
import Avatar from '@/ui/Base/Avatar';
import Badge from '@/v1/base/Badge';
import Avatar from '@/v1/base/Avatar';
import BookCover from '@/v1/book/BookCover';
import BookGroupStatus from '@/v1/bookGroup/BookGroupStatus';

Expand Down
2 changes: 1 addition & 1 deletion src/v1/bookGroup/detail/CommentList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconHamburger } from '@public/icons';
import Avatar from '@/ui/Base/Avatar';
import Avatar from '@/v1/base/Avatar';
import { useBookGroupComments } from '@/queries/group/useBookGroupCommentsQuery';
import { useMyProfileId } from '@/queries/user/useMyProfileQuery';
import { isAuthed } from '@/utils/helpers';
Expand Down
4 changes: 2 additions & 2 deletions src/v1/bookGroup/detail/JoinBookGroupButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { isAxiosErrorWithCustomCode } from '@/utils/helpers';

import { useBookGroupJoinInfo } from '@/queries/group/useBookGroupQuery';
import groupAPI from '@/apis/group';
import useToast from '@/ui/Base/Toast/useToast';
import BottomActionButton from '@/ui/Base/BottomActionButton';
import useToast from '@/v1/base/Toast/useToast';
import BottomActionButton from '@/v1/base/BottomActionButton';

const JoinBookGroupButton = ({ groupId }: { groupId: number }) => {
const _router = useRouter();
Expand Down
2 changes: 1 addition & 1 deletion src/v1/bookGroup/detail/ShortMemberInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconArrowLeft } from '@public/icons';
import Button from '@/ui/Base/Button';
import Button from '@/v1/base/Button';
import MemberItem from './MemberItem';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
Expand Down
2 changes: 1 addition & 1 deletion src/v1/bookShelf/BookShelf.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { APIBookshelf } from '@/types/bookshelf';
import { IconArrowRight, IconHeart } from '@public/icons';
import Link from 'next/link';
import Badge from '@/ui/Base/Badge';
import Badge from '@/v1/base/Badge';
import Image from 'next/image';
import { APIBook } from '@/types/book';
import { ReactNode, useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/v1/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { usePathname } from 'next/navigation';

import BottomNavigation from '@/ui/Base/BottomNavigation';
import BottomNavigation from '@/v1/base/BottomNavigation';

/**
* @todo
Expand Down
12 changes: 6 additions & 6 deletions src/v1/profile/AddJobProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import type { APIJobGroup } from '@/types/job';
import { isAxiosError } from 'axios';
import useMyProfileMutation from '@/queries/user/useMyProfileMutation';

import TopNavigation from '@/ui/Base/TopNavigation';
import Input from '@/ui/Base/Input';
import InputLength from '@/ui/Base/InputLength';
import Select from '@/ui/Base/Select';
import ErrorMessage from '@/ui/Base/ErrorMessage';
import useToast from '@/ui/Base/Toast/useToast';
import TopNavigation from '@/v1/base/TopNavigation';
import Input from '@/v1/base/Input';
import InputLength from '@/v1/base/InputLength';
import Select from '@/v1/base/Select';
import ErrorMessage from '@/v1/base/ErrorMessage';
import useToast from '@/v1/base/Toast/useToast';

type AddJobProfileProps = {
jobCategories: APIJobGroup[];
Expand Down
12 changes: 6 additions & 6 deletions src/v1/profile/EditProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import useMyProfileMutation from '@/queries/user/useMyProfileMutation';

import { IconClose } from '@public/icons';

import TopNavigation from '@/ui/Base/TopNavigation';
import Input from '@/ui/Base/Input';
import InputLength from '@/ui/Base/InputLength';
import Select from '@/ui/Base/Select';
import ErrorMessage from '@/ui/Base/ErrorMessage';
import useToast from '@/ui/Base/Toast/useToast';
import TopNavigation from '@/v1/base/TopNavigation';
import Input from '@/v1/base/Input';
import InputLength from '@/v1/base/InputLength';
import Select from '@/v1/base/Select';
import ErrorMessage from '@/v1/base/ErrorMessage';
import useToast from '@/v1/base/Toast/useToast';

type UserProfileProps = {
profile: Pick<APIUser, 'nickname' | 'job'>;
Expand Down

0 comments on commit fd8ad31

Please sign in to comment.