Skip to content

Commit

Permalink
refactor: 충돌 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoiMHMH committed Apr 6, 2024
1 parent 0931e10 commit 9be0f61
Show file tree
Hide file tree
Showing 69 changed files with 99 additions and 3,894 deletions.
3,456 changes: 99 additions & 3,357 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"lint": "next lint"
},
"dependencies": {
<<<<<<< HEAD
"axios": "^1.6.2",
"classnames": "^2.3.2",
"date-fns": "^2.30.0",
Expand All @@ -19,26 +18,12 @@
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
=======
"axios": "^1.6.8",
"classnames": "^2.5.1",
"date-fns": "^3.6.0",
"next": "^14.1.4",
"react": "^18",
"react-dom": "^18",
"sass": "^1.72.0"
},
"devDependencies": {
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "13.5.6",
<<<<<<< HEAD
"sass": "^1.69.5",
=======
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee
"typescript": "^5"
}
}
47 changes: 0 additions & 47 deletions pages/FolderPage.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions pages/SharedPage.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<<<<<<< HEAD
import "@/styles/reset.css";
=======
import "../styles/global.scss";
import "../styles/reset.css";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee
import type { AppProps } from "next/app";

export default function App({ Component, pageProps }: AppProps) {
Expand Down
9 changes: 0 additions & 9 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<<<<<<< HEAD
import Head from "next/head";
import Image from "next/image";
import { Inter } from "next/font/google";
import styles from "@/styles/Home.module.css";
import Link from "next/link";
=======
import { Inter } from "next/font/google";
import styles from "@/styles/Home.module.css";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

const inter = Inter({ subsets: ["latin"] });

export default function Home() {
return (
<>
<<<<<<< HEAD
<Head>
<title>Linkbrary</title>
</Head>
Expand Down Expand Up @@ -57,9 +51,6 @@ export default function Home() {
</h1>
</Link>
<main></main>
=======
<h1>홈페이지입니다</h1>
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee
</>
);
}
31 changes: 0 additions & 31 deletions public/index.html

This file was deleted.

7 changes: 0 additions & 7 deletions src/folder/data-access-folder/useGetFolder.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<<<<<<< HEAD
import { SampleFolderRawData } from "@/src/folder/type";
import { mapFolderData } from "@/src/folder/util-map";
import { useAsync } from "@/src/sharing/util";
import { axiosInstance } from "@/src/sharing/util";
=======
import { SampleFolderRawData } from "folder/type";
import { mapFolderData } from "folder/util-map";
import { useAsync } from "sharing/util";
import { axiosInstance } from "sharing/util";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

export const useGetFolder = () => {
const getFolder = () => axiosInstance.get<{ folder: SampleFolderRawData }>("sample/folder");
Expand Down
7 changes: 0 additions & 7 deletions src/folder/data-access-folder/useGetFolders.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<<<<<<< HEAD
import { FolderRawData } from "@/src/folder/type";
import { mapFoldersData } from "@/src/folder/util-map/mapFoldersData";
import { axiosInstance } from "@/src/sharing/util";
import { useAsync } from "@/src/sharing/util";
=======
import { FolderRawData } from "folder/type";
import { mapFoldersData } from "folder/util-map/mapFoldersData";
import { axiosInstance } from "sharing/util";
import { useAsync } from "sharing/util";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

export const useGetFolders = () => {
const getFolders = () => axiosInstance.get<{ data: FolderRawData[] }>("users/1/folders");
Expand Down
4 changes: 0 additions & 4 deletions src/folder/feature-folder-tool-bar/FolderToolBar.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
@import "@/styles/global.scss";
=======
@import "sharing/styles/global.scss";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

.container {
display: flex;
Expand Down
43 changes: 0 additions & 43 deletions src/folder/feature-folder-tool-bar/FolderToolBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styles from "./FolderToolBar.module.scss";
import classNames from "classnames/bind";
<<<<<<< HEAD
import { AddFolderButton } from "@/src/folder/ui-add-folder-button";
import { FolderButton } from "@/src/folder/ui-folder-button";
import { IconAndTextButton } from "@/src/sharing/ui-icon-and-text-button";
Expand All @@ -13,24 +12,6 @@ import { AlertModal } from "@/src/sharing/ui-alert-modal";
import { Folder, SelectedFolderId } from "@/src/folder/type";
import { copyToClipboard, useKakaoSdk } from "@/src/sharing/util";
import { useRouter } from "next/router";
=======
import { AddFolderButton } from "folder/ui-add-folder-button";
import { FolderButton } from "folder/ui-folder-button";
import { IconAndTextButton } from "sharing/ui-icon-and-text-button";
import {
ALL_LINKS_TEXT,
BUTTONS,
KAKAO_SHARE_DATA,
MODALS_ID,
} from "./constant";
import { ALL_LINKS_ID } from "link/data-access-link/constant";
import { KeyboardEvent, useState } from "react";
import { ShareModal } from "folder/ui-share-modal";
import { InputModal } from "sharing/ui-input-modal";
import { AlertModal } from "sharing/ui-alert-modal";
import { Folder, SelectedFolderId } from "folder/type";
import { copyToClipboard, useKakaoSdk } from "sharing/util";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

const cx = classNames.bind(styles);

Expand All @@ -40,54 +21,30 @@ type FolderToolBarProps = {
onFolderClick: (folderId: SelectedFolderId) => void;
};

<<<<<<< HEAD
export const FolderToolBar = ({ folders, selectedFolderId, onFolderClick }: FolderToolBarProps) => {
const { shareKakao } = useKakaoSdk();
const [currentModal, setCurrentModal] = useState<string | null>(null);
const [inputValue, setInputValue] = useState<string>("");
const router = useRouter();
=======
export const FolderToolBar = ({
folders,
selectedFolderId,
onFolderClick,
}: FolderToolBarProps) => {
const { shareKakao } = useKakaoSdk();
const [currentModal, setCurrentModal] = useState<string | null>(null);
const [inputValue, setInputValue] = useState<string>("");
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

const folderName =
ALL_LINKS_ID === selectedFolderId
? ALL_LINKS_TEXT
: folders?.find(({ id }) => id === selectedFolderId)?.name ?? "";
<<<<<<< HEAD

const getShareLink = () => `${window.location.origin}/shared?user=1&folder=${selectedFolderId}`;
=======
const shareLink = `${window.location.origin}/shared?user=1&folder=${selectedFolderId}`;

>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee
const closeModal = () => setCurrentModal(null);
const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
if (event.key === "Escape") {
closeModal();
}
};
const handleKakaoClick = () => {
<<<<<<< HEAD
shareKakao({ url: getShareLink(), ...KAKAO_SHARE_DATA });
};
const handleFacebookClick = () =>
window?.open(`http://www.facebook.com/sharer.php?u=${getShareLink()}`);
const handleLinkCopyClick = () => copyToClipboard(getShareLink());
=======
shareKakao({ url: shareLink, ...KAKAO_SHARE_DATA });
};
const handleFacebookClick = () =>
window.open(`http://www.facebook.com/sharer.php?u=${shareLink}`);
const handleLinkCopyClick = () => copyToClipboard(shareLink);
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

return (
<div className={cx("container")}>
Expand Down
4 changes: 0 additions & 4 deletions src/folder/type.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
import { SampleLinkRawData } from "@/src/link/type";
=======
import { SampleLinkRawData } from "link/type";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

export type SampleFolderRawData = {
id: number;
Expand Down
4 changes: 0 additions & 4 deletions src/folder/ui-add-folder-button/AddFolderButton.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
@import "@/styles/global.scss";
=======
@import "sharing/styles/global.scss";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

.container {
display: flex;
Expand Down
4 changes: 0 additions & 4 deletions src/folder/ui-add-folder-button/AddFolderButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import styles from "./AddFolderButton.module.scss";
import classNames from "classnames/bind";
<<<<<<< HEAD
import AddIcon from "./add.svg";
=======
import { ReactComponent as AddIcon } from "./add.svg";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee
import { MouseEventHandler } from "react";

const cx = classNames.bind(styles);
Expand Down
4 changes: 0 additions & 4 deletions src/folder/ui-folder-button/FolderButton.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
@import "@/styles/global.scss";
=======
@import "sharing/styles/global.scss";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

.container {
display: flex;
Expand Down
4 changes: 0 additions & 4 deletions src/folder/ui-folder-info/FolderInfo.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
@import "@/styles/global.scss";
=======
@import "sharing/styles/global.scss";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

.container {
display: flex;
Expand Down
4 changes: 0 additions & 4 deletions src/folder/ui-folder-item/FolderItem.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
@import "@/styles/global.scss";
=======
@import "sharing/styles/global.scss";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

.button {
flex: 0 0 4rem;
Expand Down
4 changes: 0 additions & 4 deletions src/folder/ui-share-modal/ShareModal.module.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<<<<<<< HEAD
@import "@/styles/global.scss";
=======
@import "sharing/styles/global.scss";
>>>>>>> 50171e98d424c44bb3c59d272d8e6e0538e98aee

.modal-header {
display: flex;
Expand Down
Loading

0 comments on commit 9be0f61

Please sign in to comment.