diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index d279392b3..88084b903 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -11,6 +11,8 @@
"babel-eslint": "^10.1.0",
"file-saver": "^2.0.5",
"jszip": "^3.10.1",
+ "msw": "^2.2.14",
+ "qs": "^6.12.1",
"react": "^18.2.0",
"react-cookie": "^4.1.1",
"react-device-detect": "^2.2.3",
@@ -20,6 +22,7 @@
"react-router-dom": "^6.5.0",
"react-scripts": "5.0.1",
"react-textarea-autosize": "^8.4.1",
+ "react-uuid": "^2.0.0",
"recoil": "^0.7.6",
"recoil-persist": "^4.2.0",
"styled-components": "^5.3.6",
@@ -78,5 +81,10 @@
"jest": "^29.3.1",
"prettier": "^2.8.1",
"ts-jest": "^29.0.3"
+ },
+ "msw": {
+ "workerDirectory": [
+ "public"
+ ]
}
}
diff --git a/apps/desktop/public/mockServiceWorker.js b/apps/desktop/public/mockServiceWorker.js
new file mode 100644
index 000000000..e891a6854
--- /dev/null
+++ b/apps/desktop/public/mockServiceWorker.js
@@ -0,0 +1,284 @@
+/* eslint-disable */
+/* tslint:disable */
+
+/**
+ * Mock Service Worker.
+ * @see https://github.com/mswjs/msw
+ * - Please do NOT modify this file.
+ * - Please do NOT serve this file on production.
+ */
+
+const PACKAGE_VERSION = '2.2.14'
+const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
+const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
+const activeClientIds = new Set()
+
+self.addEventListener('install', function () {
+ self.skipWaiting()
+})
+
+self.addEventListener('activate', function (event) {
+ event.waitUntil(self.clients.claim())
+})
+
+self.addEventListener('message', async function (event) {
+ const clientId = event.source.id
+
+ if (!clientId || !self.clients) {
+ return
+ }
+
+ const client = await self.clients.get(clientId)
+
+ if (!client) {
+ return
+ }
+
+ const allClients = await self.clients.matchAll({
+ type: 'window',
+ })
+
+ switch (event.data) {
+ case 'KEEPALIVE_REQUEST': {
+ sendToClient(client, {
+ type: 'KEEPALIVE_RESPONSE',
+ })
+ break
+ }
+
+ case 'INTEGRITY_CHECK_REQUEST': {
+ sendToClient(client, {
+ type: 'INTEGRITY_CHECK_RESPONSE',
+ payload: {
+ packageVersion: PACKAGE_VERSION,
+ checksum: INTEGRITY_CHECKSUM,
+ },
+ })
+ break
+ }
+
+ case 'MOCK_ACTIVATE': {
+ activeClientIds.add(clientId)
+
+ sendToClient(client, {
+ type: 'MOCKING_ENABLED',
+ payload: true,
+ })
+ break
+ }
+
+ case 'MOCK_DEACTIVATE': {
+ activeClientIds.delete(clientId)
+ break
+ }
+
+ case 'CLIENT_CLOSED': {
+ activeClientIds.delete(clientId)
+
+ const remainingClients = allClients.filter((client) => {
+ return client.id !== clientId
+ })
+
+ // Unregister itself when there are no more clients
+ if (remainingClients.length === 0) {
+ self.registration.unregister()
+ }
+
+ break
+ }
+ }
+})
+
+self.addEventListener('fetch', function (event) {
+ const { request } = event
+
+ // Bypass navigation requests.
+ if (request.mode === 'navigate') {
+ return
+ }
+
+ // Opening the DevTools triggers the "only-if-cached" request
+ // that cannot be handled by the worker. Bypass such requests.
+ if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
+ return
+ }
+
+ // Bypass all requests when there are no active clients.
+ // Prevents the self-unregistered worked from handling requests
+ // after it's been deleted (still remains active until the next reload).
+ if (activeClientIds.size === 0) {
+ return
+ }
+
+ // Generate unique request ID.
+ const requestId = crypto.randomUUID()
+ event.respondWith(handleRequest(event, requestId))
+})
+
+async function handleRequest(event, requestId) {
+ const client = await resolveMainClient(event)
+ const response = await getResponse(event, client, requestId)
+
+ // Send back the response clone for the "response:*" life-cycle events.
+ // Ensure MSW is active and ready to handle the message, otherwise
+ // this message will pend indefinitely.
+ if (client && activeClientIds.has(client.id)) {
+ ;(async function () {
+ const responseClone = response.clone()
+
+ sendToClient(
+ client,
+ {
+ type: 'RESPONSE',
+ payload: {
+ requestId,
+ isMockedResponse: IS_MOCKED_RESPONSE in response,
+ type: responseClone.type,
+ status: responseClone.status,
+ statusText: responseClone.statusText,
+ body: responseClone.body,
+ headers: Object.fromEntries(responseClone.headers.entries()),
+ },
+ },
+ [responseClone.body],
+ )
+ })()
+ }
+
+ return response
+}
+
+// Resolve the main client for the given event.
+// Client that issues a request doesn't necessarily equal the client
+// that registered the worker. It's with the latter the worker should
+// communicate with during the response resolving phase.
+async function resolveMainClient(event) {
+ const client = await self.clients.get(event.clientId)
+
+ if (client?.frameType === 'top-level') {
+ return client
+ }
+
+ const allClients = await self.clients.matchAll({
+ type: 'window',
+ })
+
+ return allClients
+ .filter((client) => {
+ // Get only those clients that are currently visible.
+ return client.visibilityState === 'visible'
+ })
+ .find((client) => {
+ // Find the client ID that's recorded in the
+ // set of clients that have registered the worker.
+ return activeClientIds.has(client.id)
+ })
+}
+
+async function getResponse(event, client, requestId) {
+ const { request } = event
+
+ // Clone the request because it might've been already used
+ // (i.e. its body has been read and sent to the client).
+ const requestClone = request.clone()
+
+ function passthrough() {
+ const headers = Object.fromEntries(requestClone.headers.entries())
+
+ // Remove internal MSW request header so the passthrough request
+ // complies with any potential CORS preflight checks on the server.
+ // Some servers forbid unknown request headers.
+ delete headers['x-msw-intention']
+
+ return fetch(requestClone, { headers })
+ }
+
+ // Bypass mocking when the client is not active.
+ if (!client) {
+ return passthrough()
+ }
+
+ // Bypass initial page load requests (i.e. static assets).
+ // The absence of the immediate/parent client in the map of the active clients
+ // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
+ // and is not ready to handle requests.
+ if (!activeClientIds.has(client.id)) {
+ return passthrough()
+ }
+
+ // Notify the client that a request has been intercepted.
+ const requestBuffer = await request.arrayBuffer()
+ const clientMessage = await sendToClient(
+ client,
+ {
+ type: 'REQUEST',
+ payload: {
+ id: requestId,
+ url: request.url,
+ mode: request.mode,
+ method: request.method,
+ headers: Object.fromEntries(request.headers.entries()),
+ cache: request.cache,
+ credentials: request.credentials,
+ destination: request.destination,
+ integrity: request.integrity,
+ redirect: request.redirect,
+ referrer: request.referrer,
+ referrerPolicy: request.referrerPolicy,
+ body: requestBuffer,
+ keepalive: request.keepalive,
+ },
+ },
+ [requestBuffer],
+ )
+
+ switch (clientMessage.type) {
+ case 'MOCK_RESPONSE': {
+ return respondWithMock(clientMessage.data)
+ }
+
+ case 'PASSTHROUGH': {
+ return passthrough()
+ }
+ }
+
+ return passthrough()
+}
+
+function sendToClient(client, message, transferrables = []) {
+ return new Promise((resolve, reject) => {
+ const channel = new MessageChannel()
+
+ channel.port1.onmessage = (event) => {
+ if (event.data && event.data.error) {
+ return reject(event.data.error)
+ }
+
+ resolve(event.data)
+ }
+
+ client.postMessage(
+ message,
+ [channel.port2].concat(transferrables.filter(Boolean)),
+ )
+ })
+}
+
+async function respondWithMock(response) {
+ // Setting response status code to 0 is a no-op.
+ // However, when responding with a "Response.error()", the produced Response
+ // instance will have status code set to 0. Since it's not possible to create
+ // a Response instance with status code 0, handle that use-case separately.
+ if (response.status === 0) {
+ return Response.error()
+ }
+
+ const mockedResponse = new Response(response.body, response)
+
+ Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
+ value: true,
+ enumerable: true,
+ })
+
+ return mockedResponse
+}
diff --git a/apps/desktop/src/@components/@common/Modal/index.tsx b/apps/desktop/src/@components/@common/Modal/index.tsx
deleted file mode 100644
index b7ee56940..000000000
--- a/apps/desktop/src/@components/@common/Modal/index.tsx
+++ /dev/null
@@ -1,237 +0,0 @@
-import { ReactNode } from "react";
-import * as Dialog from '@radix-ui/react-dialog';
-import styled from "styled-components";
-import { SignUpModalXIc } from "../../../assets";
-import { useState } from 'react'
-import { useGetEventList } from "../../../hooks/queries/admin/event";
-import { useNavigate } from "react-router-dom";
-import { setCookie } from "../../../utils/common/cookie";
-
-
-export function PopupModal() {
- const [isOpen, setIsOpen] = useState(true)
- const [checkedState, setCheckedState] = useState(false)
-
- const { eventListData } = useGetEventList({
- page: 1,
- limit: 6,
- });
-
-
-
- const navigate = useNavigate();
-
- function handleCheckedBox() {
- setCheckedState(!checkedState)
- }
-
- function handleCloseModal() {
- setIsOpen(!isOpen)
- }
-
- function handleClickCloseBtn() {
- if (checkedState) {
- const expiresDate = new Date();
- expiresDate.setDate(expiresDate.getDate() + 1);
- setCookie('popup', checkedState, { path: "/", expires: expiresDate })
- }
- }
-
-
- return (
- <>
- {eventListData &&
-
-
- { eventListData[0].eventTitle}
-
-
-
-
-
-
-
- {
- `[Track-1 Song Camp Pt.1: Romance]
-
-#Korea Track
-Track-1 Song Camp Korea는 다른 인디 아티스트와 협업하여 결과물을 도출하는 온라인 송캠프 프로그램으로,1위 팀은 믹싱/마스터링부터 유통까지 앨범 제작 전체 지원\n`}
- {navigate(`/event/${eventListData[0].eventId}`)}}>모집 요강 상세 보기
-
-{`\n\n#Global Track
-Track-1 Song Camp Korea is an online song camp program where independent artists collaborate to produce outcomes. The 1st place team receives full support for the entire album production process, from mixing/mastering to distribution.\n`
- }
- {navigate(`/event/${eventListData[1].eventId}`)}}>View detailed recruitment guidelines.
-
-
-
-
-
- 오늘하루 보지 않기
-
-
-
-
-
-
-
-
-
-
- }
- >
- )
-}
-
-
-
-const ModalWrapper = styled.div`
- display: flex;
- flex-direction: column;
- justify-content: space-between;
-
- height: 100%;
-`
-
-const ModalContent = styled.div`
- width: 100%;
-`
-
-const EventContent = styled.div`
- ${({theme})=> theme.fonts.description};
- color: ${({ theme }) => theme.colors.gray2};
-
- padding: 3rem 0;
-
-
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: pre-line;
-`
-
-const EventDetailText = styled.span`
- text-decoration: underline;
- text-underline-offset: 0.3rem;
-
- cursor:pointer
-`
-
-const PopupImageWrapper = styled.div`
- display: flex;
- justify-content: center;
- width: 100%;
-`
-const PopupImage = styled.img`
- width: 50%;
-`
-
-const BottomWrapper = styled.div`
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- margin-top:2rem;
-`
-
-const CheckBoxWrapper = styled.div`
- display: flex;
- align-items: center;
- gap:1rem;
-
- width:100%;
- height: 3rem;
-`
-
-const CheckBoxLabel = styled.label`
- ${({theme})=> theme.fonts.checkbox};
- color: ${({theme})=> theme.colors.gray2};
-
- cursor: pointer;
-`
-
-const CheckBox = styled.input`
-appearance: none;
- width: 2rem;
- height: 2rem;
-
- border: 1px solid ${({theme})=> theme.colors.gray2};
- border-radius: 5px;
-
- &:checked {
- border-color: transparent;
- background-color: ${({theme})=>theme.colors.main};
- }
-`
-
-
-
-export interface ModalProps {
- children: ReactNode;
- isOpen: boolean;
- onClose: () => void;
-}
-
-export default function Modal(props: ModalProps) {
- const { children, isOpen, onClose } = props;
-
- return (
-
-
-
- {children}
-
-
-
- );
-}
-
-const Styled = {
- CloseIconWrapper: styled(Dialog.Close)`
- width: 100%;
- display: flex;
- justify-content: flex-end;
- `,
-
- ModalTitle: styled.h2`
- display: flex;
- justify-content: center;
- width: 100%;
- margin: 1rem 0 4rem;
-
- ${({theme})=> theme.fonts.pretendard_text20_700}
- color: ${({ theme }) => theme.colors.white};
-
- `,
- Background: styled(Dialog.Overlay)`
- background: rgba(0, 0, 0, 0.8);
- position: fixed;
- z-index: 1000;
- inset: 0;
- animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
- `,
-
- CloseIcon: styled(SignUpModalXIc)`
- width: 3rem;
- height: 3rem;
- `,
-};
-
-
-
-const ModalContainer = styled(Dialog.Content)`
- position: fixed;
- top: 50%;
- left: 50%;
-
- width: 68.6rem;
-
- padding: 3rem;
-
- border-radius: 1rem;
- border: 1px solid #313338;
- background: rgba(14, 15, 19, 0.8);
- backdrop-filter: blur(10px);
- box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
-
- transform: translate(-50%, -50%);
-`
diff --git a/apps/desktop/src/@components/@common/audioFileUpload.tsx b/apps/desktop/src/@components/@common/audioFileUpload.tsx
deleted file mode 100644
index b0bb1bcee..000000000
--- a/apps/desktop/src/@components/@common/audioFileUpload.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-import styled from "styled-components";
-import { FolderUploadIc } from "../../assets";
-
-interface AudioFileUploadProps {
- audioFileName: string;
- audioFileType: string;
- isTextOverflow: boolean;
- handleUploadAudioFile: (e: React.ChangeEvent) => void;
-}
-
-export default function AudioFileUpload(props: AudioFileUploadProps) {
- const { audioFileName, audioFileType, isTextOverflow, handleUploadAudioFile } = props;
- return (
-
-
-
- {isTextOverflow && {audioFileType}}
-
-
-
-
-
-
- );
-}
-
-const InputWrapper = styled.div`
- display: flex;
-`;
-
-const InputFileTextWrapper = styled.div<{ fileName: string }>`
- height: 4.7rem;
- width: 20.8rem;
-
- display: flex;
- align-items: center;
- border-bottom: 0.1rem solid
- ${(props) => (props.fileName !== "" ? ({ theme }) => theme.colors.white : ({ theme }) => theme.colors.gray3)};
-`;
-
-const FileName = styled.input<{ isTextOverflow: boolean }>`
- height: 2.5rem;
- width: ${(props) => (props.isTextOverflow ? "16.4rem" : "100%")};
-
- display: flex;
- align-items: center;
-
- text-overflow: ${(props) => (props.isTextOverflow ? "ellipsis" : "default")};
-
- ${({ theme }) => theme.fonts.hashtag};
- color: ${({ theme }) => theme.colors.white};
- margin-top: 1.686rem;
- cursor: default;
-`;
-
-const FileAttribute = styled.div<{ isTextOverflow: boolean }>`
- height: 2.5rem;
- width: ${(props) => (props.isTextOverflow ? "100%" : 0)};
- width: 100%;
-
- display: flex;
- align-items: center;
- ${({ theme }) => theme.fonts.hashtag};
- color: ${({ theme }) => theme.colors.white};
- margin-top: 1.686rem;
-`;
-
-const FolderUploadIcon = styled(FolderUploadIc)`
- width: 4rem;
- height: 4rem;
- margin-left: 1.2rem;
- margin-top: 1.3rem;
-`;
-
-const FileInput = styled.input`
- display: none;
-`;
-
-const FileLable = styled.label`
- cursor: pointer;
-`;
diff --git a/apps/desktop/src/@components/@common/backButton.tsx b/apps/desktop/src/@components/@common/button/backButton.tsx
similarity index 64%
rename from apps/desktop/src/@components/@common/backButton.tsx
rename to apps/desktop/src/@components/@common/button/backButton.tsx
index 5546e0e0a..524f6968a 100644
--- a/apps/desktop/src/@components/@common/backButton.tsx
+++ b/apps/desktop/src/@components/@common/button/backButton.tsx
@@ -1,8 +1,7 @@
-import { useContext } from "react";
-import styled from "styled-components";
-import { BackButtonIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import usePrevPage from "../../hooks/common/usePrevPage";
+import styled from 'styled-components';
+import usePrevPage from '../../../hooks/common/usePrevPage';
+import { BackButtonIc } from '../../../assets';
+import { PlayUseContext } from '../../../context/playerContext';
interface BackButtonProps {
staticPrevURL?: string | number;
@@ -11,7 +10,7 @@ interface BackButtonProps {
export default function BackButton(props: BackButtonProps) {
const { staticPrevURL } = props;
const { handleMovePrevPage } = usePrevPage(staticPrevURL);
- const { quitAudioForMovePage } = useContext(PlayerContext);
+ const { quitAudioForMovePage } = PlayUseContext({});
return (
void;
-}
-
-export default function CustomButton(props: PropsWithChildren) {
- const { btnStyle, handleClickFunction, children } = props;
-
- return (
-
- {children}
-
- );
-}
-
-const Container = styled.button`
- display: flex;
- justify-content: center;
- align-items: center;
-`;
diff --git a/apps/desktop/src/@components/@common/button/standardButton.tsx b/apps/desktop/src/@components/@common/button/standardButton.tsx
deleted file mode 100644
index a1e6f5de9..000000000
--- a/apps/desktop/src/@components/@common/button/standardButton.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { PropsWithChildren } from "react";
-import styled from "styled-components";
-import { theme } from "../../../style/theme";
-
-interface StandardButtonProps {
- bgColor: string;
- fontColor: string;
- handleClickFunction?: () => void;
-}
-
-export default function StandardButton(props: PropsWithChildren) {
- const { bgColor, fontColor, handleClickFunction, children } = props;
-
- return (
-
- {children}
-
- );
-}
-
-const Container = styled.button<{ bgColor: string; fontColor: string }>`
- display: flex;
- justify-content: center;
- align-items: center;
-
- width: 55.9rem;
- height: 6.7rem;
-
- ${theme.fonts.body1};
- color: ${(props) => props.fontColor};
- background-color: ${(props) => props.bgColor};
-
- border-radius: 3.35rem;
-`;
diff --git a/apps/desktop/src/@components/@common/checkBox.tsx b/apps/desktop/src/@components/@common/checkBox.tsx
index 6e8934277..6e74ec41c 100644
--- a/apps/desktop/src/@components/@common/checkBox.tsx
+++ b/apps/desktop/src/@components/@common/checkBox.tsx
@@ -1,12 +1,8 @@
-import { createContext, PropsWithChildren, ReactElement, useState } from "react";
-import { useContextScope } from "../../hooks/common/useContextScope";
-import { CheckBoxProps, IndicatorProps, LabelProps } from "../../type/common/checkbox";
-import { getCustomElement } from "../../utils/common/compound";
-import styled from "styled-components";
-
-const DefaultIndocator = styled.input<{ isChecked: boolean }>``;
-
-const DefaultLabel = styled.label<{ isChecked: boolean }>``;
+import styled from 'styled-components';
+import { createContext, PropsWithChildren, ReactElement, useState } from 'react';
+import { useContextScope } from '../../hooks/common/useContextScope';
+import { CheckBoxProps, IndicatorProps, LabelProps } from '../../type/common/checkbox';
+import { getCustomElement } from '../../utils/common/compound';
type CheckBoxContextType = {
isChecked: boolean;
@@ -17,7 +13,7 @@ type CheckBoxContextType = {
const CheckBoxContext = createContext({
isChecked: false,
check: (externalFn: any) => {},
- id: "",
+ id: '',
});
export function CheckBoxRoot(props: PropsWithChildren) {
@@ -47,7 +43,7 @@ export function Indicator(props: PropsWithChildren) {
...restProps,
isChecked,
onClick: check,
- type: "checkbox",
+ type: 'checkbox',
id: id,
});
}
@@ -66,6 +62,7 @@ export function Label(props: PropsWithChildren) {
if (asChild) {
return getCustomElement(children as ReactElement, { ...restProps, htmlFor: id, isChecked });
}
+
return (
{children}
@@ -73,6 +70,10 @@ export function Label(props: PropsWithChildren) {
);
}
+const DefaultIndocator = styled.input<{ isChecked: boolean }>``;
+
+const DefaultLabel = styled.label<{ isChecked: boolean }>``;
+
export const CheckBox = Object.assign(CheckBoxRoot, {
Indicator,
Label,
diff --git a/apps/desktop/src/@components/@common/filter.tsx b/apps/desktop/src/@components/@common/filter.tsx
index b00294c38..8b0a6ab70 100644
--- a/apps/desktop/src/@components/@common/filter.tsx
+++ b/apps/desktop/src/@components/@common/filter.tsx
@@ -1,13 +1,92 @@
-import { useEffect, useState } from 'react';
-import { useNavigate, useSearchParams } from 'react-router-dom';
import styled, { css } from 'styled-components';
+import { useEffect, useState } from 'react';
+import { useLocation } from 'react-router-dom';
import { TrackSearchingFalseIc, TrackSearchingTrueIc } from '../../assets';
-import { CategoryId, EventCategoryId } from '../../core/common/categories';
-import { EventUpperCategoryType, UpperCategoryType } from '../../type/common/category';
+import { EventCategoryId } from '../../core/common/categories';
+import { EventUpperCategoryType } from '../../type/common/category';
import { PageType } from '../../type/common/pageType';
import { getInvariantObjectKeys, invariantOf } from '../../utils/common/invarientType';
-import { updateQueryParams } from '../../utils/common/queryString';
import { CheckBox } from './checkBox';
+import QueryString from 'qs';
+import { useRouter } from '../../hooks/common/useRouter';
+import { STATIC_ROUTES } from '../../core/common/routes';
+
+interface FilterProps {
+ pageType: PageType;
+}
+
+export default function Filter(props: FilterProps) {
+ const { pageType } = props;
+ const { categ } = QueryString.parse(useLocation().search, {
+ ignoreQueryPrefix: true,
+ });
+ const initialCateg = typeof categ === 'string' ? new Set([categ]) : new Set(categ as string[]);
+ const [selectedCategory, setSelectedCategory] = useState>(initialCateg);
+ const [trackSearch, setTrackSearch] = useState(false);
+ const router = useRouter();
+
+ function selectCategory(category: EventUpperCategoryType) {
+ const tempSelectedCategory = new Set(selectedCategory);
+ const categoryId = EventCategoryId[category];
+
+ tempSelectedCategory.has(categoryId)
+ ? tempSelectedCategory.delete(categoryId)
+ : tempSelectedCategory.add(categoryId);
+
+ setSelectedCategory(tempSelectedCategory);
+ }
+
+ function toggleTrackSearching() {
+ trackSearch ? setTrackSearch(false) : setTrackSearch(true);
+ }
+
+ useEffect(() => {
+ if (pageType === 'tracks') {
+ router.push(STATIC_ROUTES.TRACK_SEARCH, { search: { categ: Array.from(selectedCategory) } });
+ } else {
+ router.push(STATIC_ROUTES.VOCAL_SEARCH, { search: { categ: Array.from(selectedCategory) } });
+ }
+ }, [selectedCategory]);
+
+ useEffect(() => {
+ if (pageType === 'tracks') return;
+
+ router.push(STATIC_ROUTES.VOCAL_SEARCH, { search: { trackSearch: trackSearch } });
+ }, [trackSearch]);
+
+ return (
+
+ {getInvariantObjectKeys(invariantOf(EventCategoryId)).map((category) => {
+ return (
+ selectCategory(category)}
+ key={category}
+ defaultChecked={selectedCategory.has(EventCategoryId[category])}>
+
+
+ {category}
+ X
+
+
+
+ );
+ })}
+ {pageType === 'vocals' && (
+
+
+
+ {trackSearch ? : }
+
+ Track Searching
+
+
+
+
+ )}
+
+ );
+}
const FilterWrapper = styled.section`
position: fixed;
@@ -119,72 +198,3 @@ const TrackSearchingLabel = styled.p<{ isChecked?: boolean }>`
color: ${({ theme }) => theme.colors.sub2};
`}
`;
-
-interface FilterProps {
- pageType: PageType;
-}
-
-export default function Filter(props: FilterProps) {
- const { pageType } = props;
- const navigate = useNavigate();
- const [searchParams, setSearchParams] = useSearchParams();
-
- const [selectedCategory, setSelectedCategory] = useState>(new Set());
- const [trackSearch, setTrackSearch] = useState(false);
-
- function selectCategory(category: EventUpperCategoryType) {
- const tempSelectedCategory = new Set(selectedCategory);
- const categoryId = EventCategoryId[category];
-
- tempSelectedCategory.has(categoryId)
- ? tempSelectedCategory.delete(categoryId)
- : tempSelectedCategory.add(categoryId);
-
- setSelectedCategory(tempSelectedCategory);
- }
-
- function toggleTrackSearching() {
- trackSearch ? setTrackSearch(false) : setTrackSearch(true);
- }
-
- useEffect(() => {
- const categString = updateQueryParams('categ', Array.from(selectedCategory));
-
- navigate(categString);
- }, [selectedCategory]);
-
- useEffect(() => {
- trackSearch && searchParams.set('trackSearch', String(trackSearch));
- setSearchParams(searchParams);
- navigate('?' + searchParams.toString());
- }, [trackSearch]);
-
- return (
-
- {getInvariantObjectKeys(invariantOf(EventCategoryId)).map((category) => {
- return (
- selectCategory(category)} key={category}>
-
-
- {category}
- X
-
-
-
- );
- })}
- {pageType === 'vocals' && (
-
-
-
- {trackSearch ? : }
-
- Track Searching
-
-
-
-
- )}
-
- );
-}
diff --git a/apps/desktop/src/@components/@common/inputContainer.tsx b/apps/desktop/src/@components/@common/form/inputContainer.tsx
similarity index 90%
rename from apps/desktop/src/@components/@common/inputContainer.tsx
rename to apps/desktop/src/@components/@common/form/inputContainer.tsx
index 8812af10c..8ea87f7e4 100644
--- a/apps/desktop/src/@components/@common/inputContainer.tsx
+++ b/apps/desktop/src/@components/@common/form/inputContainer.tsx
@@ -1,6 +1,6 @@
-import { PropsWithChildren } from "react";
-import styled from "styled-components";
-import HashtagWarning from "./hashtag/hashtagWarning";
+import styled from 'styled-components';
+import HashtagWarning from '../hashtag/hashtagWarning';
+import { PropsWithChildren } from 'react';
interface InputContainerProps {
title: string;
diff --git a/apps/desktop/src/@components/@common/hashTag.tsx b/apps/desktop/src/@components/@common/hashtag/hashTag.tsx
similarity index 100%
rename from apps/desktop/src/@components/@common/hashTag.tsx
rename to apps/desktop/src/@components/@common/hashtag/hashTag.tsx
diff --git a/apps/desktop/src/@components/@common/homeLogo.tsx b/apps/desktop/src/@components/@common/homeLogo.tsx
index 3752a3dda..001e33ae3 100644
--- a/apps/desktop/src/@components/@common/homeLogo.tsx
+++ b/apps/desktop/src/@components/@common/homeLogo.tsx
@@ -1,16 +1,15 @@
-import { useContext } from "react";
-import { useNavigate } from "react-router-dom";
-import { PlayerContext } from "../../context/playerContext";
-import styled from "styled-components";
-import { HeaderHomeLogoIc } from "../../assets";
+import styled from 'styled-components';
+import { useNavigate } from 'react-router-dom';
+import { HeaderHomeLogoIc } from '../../assets';
+import { PlayUseContext } from '../../context/playerContext';
export default function HomeLogo() {
const navigate = useNavigate();
- const { quitAudioForMovePage } = useContext(PlayerContext);
+ const { quitAudioForMovePage } = PlayUseContext({});
function handleMoveToHome() {
quitAudioForMovePage();
- navigate("/");
+ navigate('/');
}
return (
diff --git a/apps/desktop/src/@components/@common/footer.tsx b/apps/desktop/src/@components/@common/layout/footer.tsx
similarity index 68%
rename from apps/desktop/src/@components/@common/footer.tsx
rename to apps/desktop/src/@components/@common/layout/footer.tsx
index 98126f56c..851b15d8a 100644
--- a/apps/desktop/src/@components/@common/footer.tsx
+++ b/apps/desktop/src/@components/@common/layout/footer.tsx
@@ -1,12 +1,11 @@
-import { useRecoilState } from "recoil";
-import styled, { keyframes } from "styled-components";
-import { FacebookLogoIc, InstagramLogoIc } from "../../assets";
-import bannerImg from "../../assets/image/bannerImg.png";
-import { CONVENTION_TYPE } from "../../core/common/convention/conventionType";
-import { openConventionModal } from "../../recoil/common/conventionModal";
+import styled from 'styled-components';
+import { useRecoilState } from 'recoil';
+import { FacebookLogoIc, InstagramLogoIc } from '../../../assets';
+import { CONVENTION_TYPE } from '../../../core/common/convention/conventionType';
+import { openConventionModal } from '../../../recoil/common/conventionModal';
export default function Footer() {
- const [conventionModalInform, setConventionModalInform] = useRecoilState(openConventionModal);
+ const [, setConventionModalInform] = useRecoilState(openConventionModal);
function openModal(policyCategory: string) {
setConventionModalInform({ policy: policyCategory, isOpen: true });
@@ -14,7 +13,6 @@ export default function Footer() {
return (
- {/* */}
openModal(CONVENTION_TYPE.PERSONAL)}>
개인정보처리방침
@@ -54,24 +52,6 @@ const FooterContainer = styled.footer`
background-color: black;
`;
-const LinearFlow = keyframes`
- 0% {background-position : 0rem;}
- 100% { background-position : -192rem};
-
-`;
-
-const Banner = styled.div`
- height: 6.2rem;
- background-color: black;
- margin-bottom: 5.6rem;
-
- /* margin-top: 3.1rem; */
- background: url(${bannerImg}) 0 center/192rem repeat-x;
- -webkit-animation: ${LinearFlow} 15s infinite linear;
- -moz-animation: ${LinearFlow} 15s infinite linear;
- -o-animation: ${LinearFlow} 15s infinite linear;
-`;
-
const FooterTextWrapper = styled.div`
display: flex;
justify-content: center;
diff --git a/apps/desktop/src/@components/@common/header.tsx b/apps/desktop/src/@components/@common/layout/header.tsx
similarity index 100%
rename from apps/desktop/src/@components/@common/header.tsx
rename to apps/desktop/src/@components/@common/layout/header.tsx
diff --git a/apps/desktop/src/@components/@common/Layout/index.tsx b/apps/desktop/src/@components/@common/layout/layout.tsx
similarity index 100%
rename from apps/desktop/src/@components/@common/Layout/index.tsx
rename to apps/desktop/src/@components/@common/layout/layout.tsx
diff --git a/apps/desktop/src/@components/@common/styledComponents.ts b/apps/desktop/src/@components/@common/layout/styledComponents.ts
similarity index 100%
rename from apps/desktop/src/@components/@common/styledComponents.ts
rename to apps/desktop/src/@components/@common/layout/styledComponents.ts
diff --git a/apps/desktop/src/@components/@common/conventionModal.tsx b/apps/desktop/src/@components/@common/modal/conventionModal.tsx
similarity index 86%
rename from apps/desktop/src/@components/@common/conventionModal.tsx
rename to apps/desktop/src/@components/@common/modal/conventionModal.tsx
index 19cd8e133..6e3128564 100644
--- a/apps/desktop/src/@components/@common/conventionModal.tsx
+++ b/apps/desktop/src/@components/@common/modal/conventionModal.tsx
@@ -1,13 +1,13 @@
-import styled from "styled-components";
-import { SignUpModalXIc } from "../../assets";
-import useConventionModal from "../../hooks/common/useConventionModal";
-import { checkConventionType } from "../../utils/common/convention/checkConventionType";
+import styled from 'styled-components';
+import useConventionModal from '../../../hooks/common/useConventionModal';
+import { SignUpModalXIc } from '../../../assets';
+import { checkConventionType } from '../../../utils/common/convention/checkConventionType';
export default function ConventionModal() {
- const { conventionModalInform, showConventionModal, closeModal } = useConventionModal();
+ const { conventionModalInform, closeModal } = useConventionModal();
function isIntroNotNull() {
- return checkConventionType(conventionModalInform?.policy)?.INTRO !== "";
+ return checkConventionType(conventionModalInform?.policy)?.INTRO !== '';
}
return (
@@ -86,7 +86,7 @@ const Title = styled.h1`
const Intro = styled.p<{ intro: boolean }>`
padding-bottom: ${({ intro }) => (intro ? 2.4 : 0)}rem;
- border-bottom: 0.1rem solid ${({ theme, intro }) => (intro ? theme.colors.gray3 : "transparent")};
+ border-bottom: 0.1rem solid ${({ theme, intro }) => (intro ? theme.colors.gray3 : 'transparent')};
${({ theme }) => theme.fonts.typography_intro}
color: ${({ theme }) => theme.colors.white};
diff --git a/apps/desktop/src/@components/@common/player.tsx b/apps/desktop/src/@components/@common/player.tsx
index 5ff0c1a6e..c17b5a7c5 100644
--- a/apps/desktop/src/@components/@common/player.tsx
+++ b/apps/desktop/src/@components/@common/player.tsx
@@ -1,9 +1,101 @@
-import { useContext, useEffect } from "react";
-import styled from "styled-components";
-import { PlayerPlayIc, PlayerQuitIc, PlayerStopIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import useControlPlayer from "../../hooks/common/useControlPlayer";
-import { CommentsPlayerContext } from "../trackPost";
+import styled from 'styled-components';
+import useControlPlayer from '../../hooks/common/useControlPlayer';
+import { useEffect } from 'react';
+import { PlayerPlayIc, PlayerQuitIc, PlayerStopIc } from '../../assets';
+import { PlayUseContext } from '../../context/playerContext';
+
+interface PlayerProps {
+ scope?: string;
+}
+
+export default function Player({ scope }: PlayerProps) {
+ const {
+ playAudio,
+ stopAudio,
+ quitAudio,
+ closeAudioPlayer,
+ playContextState,
+ stopContextState,
+ showPlayer,
+ contextPlaying,
+ audio,
+ playerInfo,
+ } = PlayUseContext({ scope: scope });
+
+ const {
+ progress,
+ isPlaybarHovered,
+ playBar,
+ currentTimeText,
+ totalTimetext,
+ controlAudio,
+ downMouse,
+ upMouse,
+ moveAudio,
+ hoverPlaybar,
+ detachPlyabar,
+ } = useControlPlayer(audio, contextPlaying);
+
+ window.addEventListener('popstate', quit);
+
+ function play() {
+ playContextState();
+ playAudio();
+ }
+
+ function pause() {
+ stopContextState();
+ stopAudio();
+ }
+
+ function quit() {
+ quitAudio();
+ closeAudioPlayer();
+ }
+
+ useEffect(() => {
+ if (!currentTimeText || !totalTimetext) return;
+
+ if (currentTimeText === totalTimetext) {
+ stopContextState();
+ }
+ }, [currentTimeText]);
+
+ return showPlayer ? (
+
+
+
+
+
+
+
+
+
+
+
+ {playerInfo?.title}
+ {playerInfo?.userName}
+ {contextPlaying ? : }
+
+ {currentTimeText}
+
+
+ {totalTimetext}
+
+
+
+
+
+ ) : null;
+}
const PlayerContainer = styled.section`
position: fixed;
@@ -64,7 +156,7 @@ const Pointer = styled.div<{ progress: number; isActive: boolean }>`
pointer-events: none;
- display: ${({ isActive }) => !isActive && "none"};
+ display: ${({ isActive }) => !isActive && 'none'};
`;
const PlayerBarWrapper = styled.div<{ isActive: boolean }>`
@@ -143,94 +235,3 @@ const QuitIcon = styled(PlayerQuitIc)`
pointer-events: auto;
`;
-
-interface PlayerProps {
- comment?: boolean;
-}
-
-export default function Player({ comment }: PlayerProps) {
- const {
- playAudio,
- stopAudio,
- quitAudio,
- closeAudioPlayer,
- playContextState,
- stopContextState,
- showPlayer,
- contextPlaying,
- audio,
- playerInfo,
- } = useContext(comment ? CommentsPlayerContext : PlayerContext);
-
- const {
- progress,
- isPlaybarHovered,
- playBar,
- currentTimeText,
- totalTimetext,
- controlAudio,
- downMouse,
- upMouse,
- moveAudio,
- hoverPlaybar,
- detachPlyabar,
- } = useControlPlayer(audio, contextPlaying);
-
- window.addEventListener("popstate", quit);
-
- function play() {
- playContextState();
- playAudio();
- }
-
- function pause() {
- stopContextState();
- stopAudio();
- }
-
- function quit() {
- quitAudio();
- closeAudioPlayer();
- }
-
- useEffect(() => {
- if (currentTimeText === totalTimetext) {
- stopContextState();
- }
- }, [currentTimeText]);
-
- return showPlayer ? (
-
-
-
-
-
-
-
-
-
-
-
- {playerInfo?.title}
- {playerInfo?.userName}
- {contextPlaying ? : }
-
- {currentTimeText}
-
-
- {totalTimetext}
-
-
-
-
-
- ) : null;
-}
diff --git a/apps/desktop/src/@components/@common/selectBox.tsx b/apps/desktop/src/@components/@common/selectBox.tsx
index fcb4f0cf6..212204e2a 100644
--- a/apps/desktop/src/@components/@common/selectBox.tsx
+++ b/apps/desktop/src/@components/@common/selectBox.tsx
@@ -1,6 +1,7 @@
-import { PropsWithChildren, ReactElement } from "react";
-import { useContextScope } from "../../hooks/common/useContextScope";
-import { combineStates, getCustomElement } from "../../utils/common/compound";
+import styled from 'styled-components';
+import { PropsWithChildren, ReactElement } from 'react';
+import { useContextScope } from '../../hooks/common/useContextScope';
+import { combineStates, getCustomElement } from '../../utils/common/compound';
import {
DescriptionProps,
externalStateType,
@@ -11,37 +12,10 @@ import {
SelectBoxProps,
SelectContextType,
TriggerProps,
-} from "../../type/common/select";
-import { useSelect } from "../../hooks/common/useSelect";
-import { SelectContext } from "../../context/selectContext";
-import styled from "styled-components";
+} from '../../type/common/select';
+import { useSelect } from '../../hooks/common/useSelect';
+import { SelectContext } from '../../context/selectContext';
-const DefaultLabel = styled.div`
- ${({ theme }) => theme.fonts.body1}
-`;
-
-const DefaultDescription = styled.div`
- ${({ theme }) => theme.fonts.body1}
-`;
-
-const DefaultTrigger = styled.div`
- width: 2rem;
- height: 2rem;
-`;
-
-const DefaultIndicator = styled.div<{ isSelected: boolean }>`
- width: 0.2rem;
- height: 0.2rem;
-`;
-
-const DefaultOptionGroup = styled.div``;
-
-const DefaultOption = styled.div<{ isSelected: boolean }>`
- width: 8rem;
- height: 2rem;
-`;
-
-// select컴포넌트가 context를 공유할 수 있게 하는 provider컴포넌트
export const SelectBox = (props: PropsWithChildren>) => {
const { children, defaultOpen, externalSelectState } = props;
const {
@@ -58,7 +32,6 @@ export const SelectBox = (props: PropsWithChildren) => {
const { asChild = false, children, ...restProps } = props;
@@ -68,7 +41,6 @@ export const Label = (props: PropsWithChildren) => {
return {children};
};
-// select컴포넌트에 대한 설명
export const Description = (props: PropsWithChildren) => {
const { asChild = false, children, ...restProps } = props;
@@ -78,7 +50,6 @@ export const Description = (props: PropsWithChildren) => {
return {children};
};
-// 클릭하면 selectBox를 보여줄 수 있는 trigger 버튼
export const Trigger = (props: PropsWithChildren) => {
const { asChild = false, children, ...restProps } = props;
const { toggleBoxOpen } = useContextScope(SelectContext);
@@ -92,7 +63,6 @@ export const Trigger = (props: PropsWithChildren) => {
return {children};
};
-// Option들을 담는 컨테이너 컴포넌트
export const OptionGroup = (props: PropsWithChildren) => {
const { asChild = false, children, ...restProps } = props;
const { isSelecBoxOpen } = useContextScope(SelectContext);
@@ -103,7 +73,6 @@ export const OptionGroup = (props: PropsWithChildren) => {
return isSelecBoxOpen ? {children} : null;
};
-// Option이 선택되었는지 나타내는 indicator
export const Indicator = (props: PropsWithChildren) => {
const { asChild = false, children, ...restProps } = props;
const { selectedId } = useContextScope(SelectContext);
@@ -115,7 +84,6 @@ export const Indicator = (props: PropsWithChildren) => {
return {children};
};
-// select의 각 Option
export const Option = (props: PropsWithChildren) => {
const { asChild = false, children, ...restProps } = props;
const { selectOption, selectedId } = useContextScope(SelectContext);
@@ -147,6 +115,31 @@ export const Option = (props: PropsWithChildren) => {
);
};
+const DefaultLabel = styled.div`
+ ${({ theme }) => theme.fonts.body1}
+`;
+
+const DefaultDescription = styled.div`
+ ${({ theme }) => theme.fonts.body1}
+`;
+
+const DefaultTrigger = styled.div`
+ width: 2rem;
+ height: 2rem;
+`;
+
+const DefaultIndicator = styled.div<{ isSelected: boolean }>`
+ width: 0.2rem;
+ height: 0.2rem;
+`;
+
+const DefaultOptionGroup = styled.div``;
+
+const DefaultOption = styled.div<{ isSelected: boolean }>`
+ width: 8rem;
+ height: 2rem;
+`;
+
export const Select = Object.assign(SelectBox, {
Label,
Description,
diff --git a/apps/desktop/src/@components/@common/switch.tsx b/apps/desktop/src/@components/@common/switch.tsx
index 89d29b9c6..847889404 100644
--- a/apps/desktop/src/@components/@common/switch.tsx
+++ b/apps/desktop/src/@components/@common/switch.tsx
@@ -1,7 +1,45 @@
+import styled, { css, keyframes } from 'styled-components';
import { PropsWithChildren, useContext, useState } from 'react';
import { SwitchContext } from '../../context/switchContext';
import { LabelProps, RootProps, SwitchProps, ThumbProps } from '../../type/common/switch';
-import styled, { css, keyframes } from 'styled-components';
+
+function SwitchBox(props: PropsWithChildren) {
+ const { externalState, children } = props;
+ const [currentThumb, setCurrentThumb] = useState<'on' | 'off'>('off');
+
+ const combineState = (externalFn: any, internalFn: any) => {
+ return () => {
+ externalFn?.();
+ internalFn?.();
+ };
+ };
+
+ function internalSwitchThumb() {
+ currentThumb === 'on' ? setCurrentThumb('off') : setCurrentThumb('on');
+ }
+ const switchThumb = combineState(externalState, internalSwitchThumb);
+ return {children};
+}
+
+function Label(props: LabelProps) {
+ const { onLabel, offLabel } = props;
+ const { currentThumb } = useContext(SwitchContext);
+
+ return {currentThumb === 'on' ? onLabel : offLabel};
+}
+
+function Root(props: PropsWithChildren) {
+ const { children } = props;
+ const { currentThumb } = useContext(SwitchContext);
+
+ return {children};
+}
+
+function Thumb(props: ThumbProps) {
+ const { switchThumb, currentThumb } = useContext(SwitchContext);
+
+ return ;
+}
const DefaultLabel = styled.p`
${({ theme }) => theme.fonts.hashtag}
@@ -70,44 +108,6 @@ const DefaultThumb = styled.div<{ switchState: 'on' | 'off' }>`
`}
`;
-function SwitchBox(props: PropsWithChildren) {
- const { externalState, children } = props;
- const [currentThumb, setCurrentThumb] = useState<'on' | 'off'>('off');
-
- const combineState = (externalFn: any, internalFn: any) => {
- return () => {
- externalFn?.();
- internalFn?.();
- };
- };
-
- function internalSwitchThumb() {
- currentThumb === 'on' ? setCurrentThumb('off') : setCurrentThumb('on');
- }
- const switchThumb = combineState(externalState, internalSwitchThumb);
- return {children};
-}
-
-function Label(props: LabelProps) {
- const { onLabel, offLabel } = props;
- const { currentThumb } = useContext(SwitchContext);
-
- return {currentThumb === 'on' ? onLabel : offLabel};
-}
-
-function Root(props: PropsWithChildren) {
- const { children } = props;
- const { currentThumb } = useContext(SwitchContext);
-
- return {children};
-}
-
-function Thumb(props: ThumbProps) {
- const { switchThumb, currentThumb } = useContext(SwitchContext);
-
- return ;
-}
-
export const Switch = Object.assign(SwitchBox, {
Label,
Root,
diff --git a/apps/desktop/src/@components/about/aboutMain.tsx b/apps/desktop/src/@components/about/aboutMain.tsx
deleted file mode 100644
index 7f4677900..000000000
--- a/apps/desktop/src/@components/about/aboutMain.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import styled from "styled-components";
-import mainSectionBackgroundImg from "../../assets/image/mainSectionBackgroundImg.png";
-
-interface AboutMainProps {
- handleMoveAboutSection: () => void;
- handleMoveHowToSection: () => void;
-}
-
-export default function AboutMain(props: AboutMainProps) {
- const { handleMoveAboutSection, handleMoveHowToSection } = props;
- return (
-
-
- DISCOVER YOUR LIMITLESS TRACK
- Limitless chance and inspiration for Musicians
-
-
- About us
- How to use
-
-
-
-
- );
-}
-
-const Styled = {
- MainSection: styled.section`
- width: 100%;
- height: 143rem;
-
- background: url(${mainSectionBackgroundImg});
- background-repeat: no-repeat;
- background-size: cover;
- `,
-
- MainSectionWrapper: styled.div`
- position: absolute;
-
- width: 100%;
- padding: 0 10rem;
- margin: auto;
- `,
-
- TapMenuWrapper: styled.ul`
- display: flex;
- justify-content: center;
-
- width: 100%;
-
- margin-top: 57.6rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_text30};
- `,
-
- TapMenu: styled.li`
- padding: 3rem 8rem;
-
- cursor: pointer;
-
- :hover {
- color: ${({ theme }) => theme.colors.main};
- }
- `,
-
- DivisionLine: styled.hr`
- width: 100%;
-
- border: 0.1rem solid ${({ theme }) => theme.colors.white};
-
- border-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 50.02%, rgba(255, 255, 255, 0) 100%);
- border-image-slice: 1;
- `,
-
- HeadingText: styled.h1`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading98};
-
- margin: 38.8rem 0 2rem;
-
- text-align: center;
-
- white-space: pre-line;
- `,
-
- SubDescriptionText: styled.p`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.pretendard_text25};
-
- float: right;
-
- letter-spacing: -0.025rem;
-
- white-space: pre-line;
- `,
-};
diff --git a/apps/desktop/src/@components/about/aboutUs.tsx b/apps/desktop/src/@components/about/aboutUs.tsx
deleted file mode 100644
index 35832169a..000000000
--- a/apps/desktop/src/@components/about/aboutUs.tsx
+++ /dev/null
@@ -1,178 +0,0 @@
-import styled from "styled-components";
-import aboutBackgroundImg from "../../assets/image/aboutBackgroundImg.png";
-import laptopImg from "../../assets/image/laptopImg.png";
-
-interface AboutUsProps {
- scrollRef: React.RefObject;
-}
-
-export default function AboutUs(props: AboutUsProps) {
- const { scrollRef } = props;
-
- return (
-
-
-
- {
- "예술은 창조에서 시작되고, 창조는 영감에서 비롯됩니다.\n머릿속에서 떠다니는 음악적 아이디어를 자유롭게 표현할 수 있도록\n활발한 소통의 장을 마련하는 것이 우리의 목표입니다."
- }
-
-
- {
- "Art begins with creation, and creation is born from inspiration.\nOur goal is to provide a vibrant platform for you to freely express the musical ideas floating in your mind, where you can bring fleeting musical concepts to life."
- }
-
-
-
-
-
-
-
- {
- "Track-1은 뮤지션의 잠재력을 펼치는 데에 집중합니다.\n번뜩이는 악상이 하나의 예술작품으로 구현되는 과정을 더욱 원활히 하고,\n보다 많은 예술가와 함께할 수 있도록 협업 기회를 제공합니다."
- }
-
-
- {
- "Track-1 focuses on unleashing the potential of musicians.\nWe aim to streamline the process of transforming a brilliant melody into a work of art and offer more collaborative opportunities by bringing artists together."
- }
-
- {"Discover your\nLimitless\nChance and inspiration"}
-
-
-
-
- {
- "뮤직 트랙에 담긴 영감과 잠재력이 무한하듯, 눈 앞에 펼쳐진 가능성의 트랙도 끝이 없습니다.\n작업실에서의 흥얼거림이 세상을 흔드는 파동이 될 수 있도록,\n잠재된 수많은 트랙을 발견하고 세상 밖으로 꺼낼 수 있도록, 우리는 준비하고 기다립니다."
- }
-
-
- {
- "Just as the inspiration and potential within music tracks seem limitless, so does the endless potential of the tracks waiting before you.\nAs the hums in your studio may create waves that shake the world,\nwe are ready and waiting to help you discover and share countless hidden tracks with the world."
- }
-
-
-
- );
-}
-
-const Styled = {
- AboutSection: styled.section`
- width: 100%;
-
- margin-top: -20.3rem;
-
- padding-top: 14.3rem;
- `,
-
- AboutSectionWrapper: styled.div`
- width: 100%;
-
- padding: 0 10rem;
-
- &.last_wrapper {
- margin-top: 75.3rem;
- }
- `,
-
- AboutBackgroundImageSectionWrapper: styled.div`
- position: relative;
-
- width: 100%;
- height: 94.4rem;
-
- padding: 0 10rem;
-
- padding-top: 16.7rem;
-
- background: url(${aboutBackgroundImg});
- background-repeat: no-repeat;
- background-size: cover;
- `,
-
- TapMenuWrapper: styled.ul`
- display: flex;
- justify-content: center;
-
- width: 100%;
-
- margin-top: 57.6rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_text30};
- `,
-
- TapMenu: styled.li`
- padding: 3rem 8rem;
-
- cursor: pointer;
-
- :hover {
- color: ${({ theme }) => theme.colors.main};
- }
- `,
-
- LaptopImage: styled.img`
- width: 100%;
-
- margin: 6.4rem 0 6.5rem;
- `,
-
- HeadingText: styled.h1`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading98};
-
- margin: 38.8rem 0 2rem;
-
- white-space: pre-line;
-
- &.text-center {
- text-align: center;
- }
-
- &.purple {
- position: absolute;
- top: 85.8rem;
- margin: 0;
- color: ${({ theme }) => theme.colors.main};
- ${({ theme }) => theme.fonts.alexandria_text148};
-
- text-align: right;
- }
- `,
-
- SubDescriptionText: styled.p`
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.pretendard_text25};
-
- letter-spacing: -0.025rem;
-
- white-space: pre-line;
-
- &.description {
- margin-top: 5rem;
-
- color: ${({ theme }) => theme.colors.gray2};
- font-weight: 500;
- line-height: 4.375rem;
- letter-spacing: -0.25px;
- }
-
- &.text-center {
- text-align: center;
- }
- `,
-
- AboutDescriptionText: styled.h2`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.pretendard_text40};
-
- margin-bottom: 6.4rem;
-
- white-space: pre-line;
-
- &.text-center {
- text-align: center;
- }
- `,
-};
diff --git a/apps/desktop/src/@components/about/howToUse.tsx b/apps/desktop/src/@components/about/howToUse.tsx
deleted file mode 100644
index 8289c5fd4..000000000
--- a/apps/desktop/src/@components/about/howToUse.tsx
+++ /dev/null
@@ -1,229 +0,0 @@
-import styled from "styled-components";
-import commentExampleImg from "../../assets/image/commentExampleImg.png";
-import vocalSearchExampleImg from "../../assets/image/vocalSearchExampleImg.png";
-
-interface HowToUseProps {
- scrollRef: React.RefObject;
-}
-
-export default function HowToUse(props: HowToUseProps) {
- const { scrollRef } = props;
- return (
-
-
-
-
- {"Collaboration\nPlatform\nfor Musicians"}
-
- {"User Guideline"}
-
-
-
-
- {
- "Track-1은 보컬과 프로듀서가 서로 협업할 뮤지션을 찾을 수 있는 플랫폼입니다.\n원하는 느낌의 뮤지션을 편리하게 탐색할 수 있고,\n데모 작업을 통해 직관적으로 잘 맞는 뮤지션과 컨택할 수 있습니다.\nTrack-1에서 무궁무진한 협업의 기회를 얻어가세요."
- }
-
-
- {
- "Track-1 is a platform where vocalists and producers\ncan find fellow musicians to collaborate with.\nYou can conveniently explore musicians with the desired vibe and\neasily get in touch with those who are a perfect match through demo work.\nDiscover endless opportunities for collaboration on Track-1."
- }
-
-
-
-
-
-
-
-
-
-
-
- {"Listen for yourself"}
-
- {
- "프로듀서가 업로드한 스케치곡에 보컬이 자신의 목소리를 입혀 댓글을 달 수 있어요.\n내 곡에 가장 잘 맞는 보컬을 직관적으로 찾아보세요."
- }
-
-
-
- {
- "Producers upload demo tracks.\nVocalists can add their voice to the demo track they like and leave comments."
- }
-
-
-
-
- {}
-
-
- {"Optimized\nfor exploration"}
-
- {
- "음악 장르를 필터링하고, 다른 뮤지션의 대표곡을 들어볼 수 있어요.\n원하는 느낌의 뮤지션을 빠르고 편리하게 찾아보세요!"
- }
-
-
- {"Easily discover talented musicians who complement your style and sound."}
-
-
-
-
-
-
-
- );
-}
-
-const Styled = {
- HowtoSection: styled.section`
- width: 100%;
-
- margin-top: 14.3rem;
-
- padding-top: 11.7rem;
- `,
-
- HeadingText: styled.h1`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading98};
-
- margin: 38.8rem 0 2rem;
-
- white-space: pre-line;
-
- &.text-center {
- text-align: center;
- }
-
- &.purple {
- margin: 32.3rem 0;
-
- color: ${({ theme }) => theme.colors.main};
- ${({ theme }) => theme.fonts.alexandria_text148};
-
- text-align: right;
- }
-
- &.howTo_100 {
- margin: 0;
- margin-bottom: 67.5rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading100};
-
- background: linear-gradient(109deg, #fff 40.49%, rgba(59, 60, 63, 0) 110.64%);
- background-clip: text;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
-
- &.howTo_90 {
- margin: 0;
- margin-bottom: 10rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading100};
- }
- `,
-
- SubDescriptionText: styled.p`
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.pretendard_text25};
-
- letter-spacing: -0.025rem;
-
- white-space: pre-line;
-
- &.main-section {
- color: ${({ theme }) => theme.colors.white};
- float: right;
- }
-
- &.howTo-section {
- color: ${({ theme }) => theme.colors.white};
- font-weight: 500;
- line-height: 4.5rem;
- }
-
- &.description {
- margin-top: 5rem;
-
- color: ${({ theme }) => theme.colors.gray2};
- font-weight: 500;
- line-height: 4.375rem;
- letter-spacing: -0.25px;
- }
-
- &.text-center {
- text-align: center;
- }
- `,
-
- HowToSectionWrapper: styled.div`
- padding: 0 10rem;
- `,
-
- HowToTextWrapper: styled.div`
- display: flex;
-
- width: 100%;
- height: 100%;
-
- display: flex;
- `,
-
- HowToLeftTextWrapper: styled.div`
- width: 87.1rem;
-
- h1 {
- &:last-child {
- margin: 0;
- }
- }
- `,
-
- HowToRightTextWrapper: styled.div`
- width: calc(100% - 87.1rem);
-
- &.howTo_100 {
- padding-top: 35.1rem;
- }
- `,
-
- CommentExampleImage: styled.img`
- width: 100%;
-
- margin: 10rem 0 25rem;
- `,
-
- VocalSearchExampleImage: styled.img`
- width: 100%;
-
- margin: 10rem 0 20rem;
- `,
-
- Video: styled.video`
- width: 192rem;
- height: 108rem;
-
- margin: 10rem 0 35rem;
-
- animation: showVideo 2s ease-out;
-
- @keyframes showVideo {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
- `,
-};
diff --git a/apps/desktop/src/@components/about/index.tsx b/apps/desktop/src/@components/about/index.tsx
deleted file mode 100644
index 7e75a1993..000000000
--- a/apps/desktop/src/@components/about/index.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import styled from 'styled-components';
-import Footer from '../@common/footer';
-import { useEffect, useRef } from 'react';
-import AboutUs from './aboutUs';
-import HowToUse from './howToUse';
-import AboutMain from './aboutMain';
-import MainHeader from '../main/mainHeader';
-
-export default function About() {
- const aboutSectionRef = useRef(null);
- const howToSectionRef = useRef(null);
-
- useEffect(() => {
- window.scrollTo(0, 0);
- }, []);
-
- function handleMoveAboutSection() {
- aboutSectionRef.current?.scrollIntoView({ behavior: 'smooth' });
- }
-
- function handleMoveHowToSection() {
- howToSectionRef.current?.scrollIntoView({ behavior: 'smooth' });
- }
-
- return (
- <>
-
- {/* Main */}
-
- {/* About us */}
-
- {/* How to use */}
-
-
-
- >
- );
-}
diff --git a/apps/desktop/src/@components/admin/adminHeader.tsx b/apps/desktop/src/@components/admin/adminHeader.tsx
deleted file mode 100644
index c6dd5157b..000000000
--- a/apps/desktop/src/@components/admin/adminHeader.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import styled, { CSSProperties } from 'styled-components';
-import Header from '../@common/header';
-import { MainLogoWhiteIc } from '../../assets';
-import LoginBtn from '../main/loginBtn';
-import { theme } from '../../style/theme';
-import { useNavigate } from 'react-router-dom';
-
-export default function AdminHeader() {
- const navigate = useNavigate();
-
- function handleMoveHome() {
- navigate('/');
- }
-
- function handleMoveEvent() {
- navigate('/admin/event');
- }
-
- return (
-
-
-
-
-
- About
- Event
-
-
-
-
-
-
-
- );
-}
-
-const headerStyle: CSSProperties = {
- position: 'sticky',
- zIndex: '5',
- background: `${theme.colors.black}`,
-};
-
-const Styled = {
- HeaderWrapper: styled.div`
- display: flex;
- `,
- MainLogoWhiteIcon: styled(MainLogoWhiteIc)`
- width: 18.3rem;
-
- cursor: pointer;
- `,
-
- NavMenuContainer: styled.nav`
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- margin-left: 10rem;
-
- color: ${({ theme }) => theme.colors.gray2};
- ${({ theme }) => theme.fonts.pretendard_text22};
- `,
-
- NavMenuWrapper: styled.ul`
- display: flex;
-
- li {
- &:last-child {
- margin: 0;
- }
- }
- `,
-
- NavMenu: styled.li`
- display: flex;
- align-items: center;
- margin-right: 8rem;
-
- cursor: pointer;
-
- :hover {
- color: ${({ theme }) => theme.colors.white};
- }
-
- &.nav-track {
- :hover {
- color: ${({ theme }) => theme.colors.sub1};
- }
- }
-
- &.nav-vocal {
- :hover {
- color: ${({ theme }) => theme.colors.sub2};
- }
- }
- `,
-
- DivisionLine: styled.hr`
- width: 2.4rem;
-
- margin: 0 5rem;
-
- border: 0.1rem solid ${({ theme }) => theme.colors.gray2};
-
- transform: rotate(90deg);
- `,
-};
diff --git a/apps/desktop/src/@components/admin/event/eventUpload.tsx b/apps/desktop/src/@components/admin/event/eventUpload.tsx
deleted file mode 100644
index a7dd146d6..000000000
--- a/apps/desktop/src/@components/admin/event/eventUpload.tsx
+++ /dev/null
@@ -1,173 +0,0 @@
-import styled from 'styled-components';
-import PasswordContainer from '../../@common/passwordContainer';
-import useUploadImageFile from '../../../hooks/common/useUploadImageFile';
-import { UploadAbleBtnIc, UploadUnableBtnIc } from '../../../assets';
-import useInputText from '../../../hooks/common/useInputText';
-import { useUploadEvent } from '../../../hooks/queries/admin/event';
-
-export default function EventUpload() {
- const [title, handleChangeTitle] = useInputText('');
- const { imageFile, handleUploadImageFile } = useUploadImageFile();
- const [startDate, handleChangeStartDate] = useInputText('');
- const [startTime, handleChangeStartTime] = useInputText('');
- const [endDate, handleChangeEndDate] = useInputText('');
- const [endTime, handleChangeEndTime] = useInputText('');
- const [introduction, handleChangeIntroduction] = useInputText('');
-
- const { uploadEvent } = useUploadEvent();
-
- function checkAbleState() {
- return title && imageFile && startDate && startTime && endDate && endTime;
- }
-
- function handleEventUpload() {
- const formData = new FormData();
- const eventImageFile = imageFile && new Blob([imageFile], { type: imageFile?.type });
-
- formData.append('eventTitle', title);
- formData.append('eventStartDate', startDate);
- formData.append('eventStartTime', startTime);
- formData.append('eventEndDate', endDate);
- formData.append('eventEndTime', endTime);
- formData.append('eventIntroduction', introduction);
-
- eventImageFile && formData.append('eventImageFile', eventImageFile);
-
-
- uploadEvent(formData);
- }
-
- return (
-
-
-
-
- 이벤트 제목
-
-
-
-
- 이벤트 사진
-
-
-
-
- 이벤트 시작날짜
-
-
-
-
- 이벤트 시작시간
-
-
-
-
- 이벤트 종료날짜
-
-
-
- 이벤트 종료시간
-
-
-
- 이벤트 소개
-
-
-
- {checkAbleState() ? : }
-
-
- );
-}
-
-const Styled = {
- Container: styled.main`
- display: flex;
- justify-content: center;
-
- width: 100%;
- `,
-
- InputContainer: styled.div`
- display: flex;
- flex-direction: column;
- justify-content: space-between;
-
- width: 100%;
- height: 100%;
-
- padding: 5rem 3rem;
- `,
-
- InputWrapper: styled.div`
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- width: 100%;
- min-height: 5.5rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading20};
- `,
-
- InputTitle: styled.h2`
- width: 20rem;
- `,
-
- Input: styled.input`
- width: 100%;
- height: 100%;
- padding: 0.5rem 2rem;
-
- ${({ theme }) => theme.fonts.input}
- color: white;
-
- border: 1px solid ${({ theme }) => theme.colors.main};
- border-radius: 1rem;
-
- ::placeholder {
- color: ${({ theme }) => theme.colors.gray2};
- }
- `,
-
- Introduce: styled.textarea`
- width: 100%;
- height: 12rem;
- padding: 0.5rem 2rem;
-
- ${({ theme }) => theme.fonts.input};
- color: white;
-
- border: 1px solid ${({ theme }) => theme.colors.main};
- border-radius: 1rem;
-
- ::placeholder {
- color: ${({ theme }) => theme.colors.gray2};
- }
- `,
-
- UploadAbleBtnIcon: styled(UploadAbleBtnIc)`
- margin: 3rem 0;
-
- cursor: pointer;
- `,
- UploadUnAbleBtnIcon: styled(UploadUnableBtnIc)`
- margin: 3rem 0;
-
- cursor: pointer;
- `,
-};
diff --git a/apps/desktop/src/@components/admin/index.tsx b/apps/desktop/src/@components/admin/index.tsx
deleted file mode 100644
index 6f0d8eb99..000000000
--- a/apps/desktop/src/@components/admin/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import AdminHeader from './adminHeader';
-import EventUpload from './event/eventUpload';
-
-export default function Admin() {
- return (
- <>
-
-
- >
- );
-}
diff --git a/apps/desktop/src/@components/error/index.tsx b/apps/desktop/src/@components/error/index.tsx
index d5470fe0f..1b025e12b 100644
--- a/apps/desktop/src/@components/error/index.tsx
+++ b/apps/desktop/src/@components/error/index.tsx
@@ -1,23 +1,22 @@
-import React from "react";
-import background from "../../assets/image/backgroundImg.png";
-import { useNavigate } from "react-router-dom";
-import ConventionModal from "../@common/conventionModal";
-import styled from "styled-components";
-import { ErrorPageMainIc, ErrorPageTextIc, TrackOneMainLogoIc } from "../../assets";
-import useModal from "../../hooks/common/useModal";
+import styled from 'styled-components';
+import background from '../../assets/image/backgroundImg.png';
+import ConventionModal from '../@common/modal/conventionModal';
+import useModal from '../../hooks/common/useModal';
+import { useNavigate } from 'react-router-dom';
+import { ErrorPageMainIc, ErrorPageTextIc, TrackOneMainLogoIc } from '../../assets';
export default function ErrorPageContainer() {
const { openModal } = useModal();
const navigate = useNavigate();
function moveToMain() {
- navigate("/");
+ navigate('/');
}
async function copyLink(text: string) {
try {
await navigator.clipboard.writeText(text);
- alert("Copy link completed.\n링크가 복사되었습니다. ");
+ alert('Copy link completed.\n링크가 복사되었습니다. ');
} catch (err) {
console.log(err);
}
@@ -39,7 +38,7 @@ export default function ErrorPageContainer() {
Or Please contact us
- copyLink("admin@track-1.link")}>admin@track-1.link
+ copyLink('admin@track-1.link')}>admin@track-1.link
diff --git a/apps/desktop/src/@components/event/eventDetail.tsx b/apps/desktop/src/@components/event/eventDetail.tsx
deleted file mode 100644
index c5cdea9f0..000000000
--- a/apps/desktop/src/@components/event/eventDetail.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import styled from 'styled-components';
-import { EventBackBtnIc } from '../../assets';
-import { CommonSectionStyled } from '../main/eventSection';
-import { useParams } from 'react-router-dom';
-import { useGetEventDetail } from '../../hooks/queries/admin/event';
-import usePrevPage from '../../hooks/common/usePrevPage';
-
-export default function EventDetail() {
- const { eventId } = useParams();
-
- const { eventDetailData } = useGetEventDetail(Number(eventId));
-
- const { handleMovePrevPage } = usePrevPage();
-
- return (
- <>
-
-
- Events for you
- {eventDetailData?.eventDday}
-
-
-
-
-
-
-
-
- {eventDetailData?.eventTitle}
- {eventDetailData?.eventDate}
-
-
- {eventDetailData?.eventIntroduction}
-
-
- >
- );
-}
-
-const Styled = {
- DetailTopWrapper: styled.div`
- display: flex;
- justify-content: space-between;
- width: 100%;
-
- padding: 10rem 10rem 0;
- margin-bottom: 5rem;
- `,
-
- EventBackBtnIcon: styled(EventBackBtnIc)`
- width: 1.7rem;
-
- cursor: pointer;
- `,
-
- DdayText: styled.p`
- ${({ theme }) => theme.fonts.pretendard_text30};
- color: ${({ theme }) => theme.colors.main};
- `,
-
- DetailEventImage: styled.img`
- width: 100%;
- aspect-ratio: 1/1;
-
- /* padding: 0 10rem; */
- `,
-
- DetailEventImageWarpper: styled.div`
- display: flex;
- justify-content: center;
-
- width: 100%;
- `,
-
- DetailInfoWrapper: styled.div`
- display: flex;
- justify-content: space-between;
-
- gap: 10rem;
-
- width: 100%;
- padding: 10rem 10rem 20rem 10rem;
-
- white-space: pre-line;
-
- user-select: text;
- `,
-
- DetailInfo: styled.div`
- width: 66.7rem;
-
- ${({ theme }) => theme.fonts.pretendard_text40};
- color: ${({ theme }) => theme.colors.white};
-
- letter-spacing: -0.4px;
- `,
-
- DetailEventTitleWrapper: styled.div``,
-
- DetailEventTitle: styled.h1`
- ${({ theme }) => theme.fonts.pretendard_heading70};
- color: ${({ theme }) => theme.colors.white};
-
- letter-spacing: -0.7px;
-
- margin-bottom: 5rem;
- `,
-
- DetailEventDescriptionWrapper: styled.div`
- width: 85.3rem;
-
- ${({ theme }) => theme.fonts.pretendard_text28};
- color: ${({ theme }) => theme.colors.white};
- `,
-};
diff --git a/apps/desktop/src/@components/event/eventList.tsx b/apps/desktop/src/@components/event/eventList.tsx
deleted file mode 100644
index ece4805cb..000000000
--- a/apps/desktop/src/@components/event/eventList.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import styled from 'styled-components';
-import EventInfo from '../main/eventInfo';
-import { CommonSectionStyled } from '../main/eventSection';
-import { DefaultToggleIc, EventToggleIc } from '../../assets';
-import { useState } from 'react';
-import { useGetEventList } from '../../hooks/queries/admin/event';
-import useInfiniteScroll from '../../hooks/common/useInfiniteScroll';
-
-export default function EventList() {
- const { eventListData, fetchNextPage, hasNextPage } = useGetEventList({
- page: 1,
- limit: 6,
- });
-
- const { observerRef } = useInfiniteScroll(fetchNextPage, hasNextPage);
-
- const [showProgressEvent, setShowProgressEvent] = useState(false);
-
- function handleChangeToggle() {
- setShowProgressEvent(!showProgressEvent);
- }
-
- return (
-
-
- Events for you
-
- 진행중인 이벤트
- {showProgressEvent ? (
-
- ) : (
-
- )}
-
-
-
-
- {eventListData?.map((event) =>
- showProgressEvent ? (
- event.eventInProgress && (
-
- )
- ) : (
-
- )
- )}
-
-
-
- );
-}
-
-const Styled = {
- ToggleWrapper: styled.div`
- display: flex;
- align-items: center;
-
- ${({ theme }) => theme.fonts.pretendard_text22};
- color: ${({ theme }) => theme.colors.gray1};
-
- margin-top: 1.4rem;
- `,
-
- DefaultToggleIcon: styled(DefaultToggleIc)`
- width: 5.8rem;
-
- margin-left: 1.5rem;
-
- cursor: pointer;
- `,
-
- EventToggleIcon: styled(EventToggleIc)`
- width: 5.8rem;
-
- margin-left: 1.5rem;
-
- cursor: pointer;
- `,
-
- Observer: styled.div`
- width: 100%;
- height: 10px;
- `,
-};
diff --git a/apps/desktop/src/@components/event/hotEvent.tsx b/apps/desktop/src/@components/event/hotEvent.tsx
deleted file mode 100644
index 0568a7898..000000000
--- a/apps/desktop/src/@components/event/hotEvent.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import styled from 'styled-components';
-import { useGetEventList } from '../../hooks/queries/admin/event';
-import { useNavigate } from 'react-router-dom';
-
-interface HotEventProps {
- scrollRef: React.RefObject;
-}
-
-export default function HotEvent(props: HotEventProps) {
- const { scrollRef } = props;
- const { eventListData } = useGetEventList({
- page: 1,
- limit: 6,
- });
-
- const navigate = useNavigate();
-
- function handleMoveEventDetail() {
- eventListData && navigate(`/event/${eventListData[0]?.eventId}`);
- }
-
- return (
-
-
-
- {`TODAY'S\nHOT EVENT\nHERE`}
- {eventListData && eventListData[0].eventTitle}
- {eventListData && eventListData[0].eventDate}
-
-
-
-
-
- );
-}
-
-const Styled = {
- Container: styled.section`
- width: 100%;
-
- padding: 29.3rem 10rem 0;
- margin-bottom: 29rem;
- `,
-
- HotEventInfoWrapper: styled.div`
- display: flex;
- flex-direction: column;
-
- width: 83.5rem;
- height: 55.2rem;
- `,
-
- HotEventHeadingText: styled.h1`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading90};
-
- white-space: pre-line;
- `,
-
- HotEventTitle: styled.h3`
- ${({ theme }) => theme.fonts.pretendard_text30};
- color: ${({ theme }) => theme.colors.white};
-
- margin-top: 9rem;
- `,
-
- HotEventPeriod: styled.p`
- ${({ theme }) => theme.fonts.pretendard_text20};
- color: ${({ theme }) => theme.colors.gray2};
-
- margin-top: 2rem;
- `,
-
- HotEventThumbnailImage: styled.img`
- width: 83.5rem;
- height: 83.5rem;
-
- cursor: pointer;
- `,
-};
-
-const EventSectionWrapper = styled.div`
- width: 100%;
-
- display: flex;
- justify-content: space-between;
-
- flex-wrap: wrap;
-`;
diff --git a/apps/desktop/src/@components/event/index.tsx b/apps/desktop/src/@components/event/index.tsx
deleted file mode 100644
index 2e9abcb80..000000000
--- a/apps/desktop/src/@components/event/index.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import { useLocation } from 'react-router-dom';
-import Footer from '../@common/footer';
-import MainHeader from '../main/mainHeader';
-import EventList from './eventList';
-import HotEvent from './hotEvent';
-import EventDetail from './eventDetail';
-import styled from 'styled-components';
-import { ScrollTopBtnIc } from '../../assets';
-import { useEffect, useRef } from 'react';
-
-export default function Event() {
- const pathname = useLocation().pathname;
-
- const hotEventSectionRef = useRef(null);
-
- useEffect(() => {
- window.scrollTo(0, 0);
- }, []);
-
- function handleMoveHotEventSection() {
- hotEventSectionRef.current?.scrollIntoView({ behavior: 'smooth' });
- }
-
- return (
- <>
-
- {pathname === '/event' ? (
- <>
-
-
- >
- ) : (
-
- )}
-
-
- >
- );
-}
-
-const Styled = {
- ScrollTopBtnIcon: styled(ScrollTopBtnIc)`
- position: fixed;
-
- bottom: 1.2rem;
- right: 10rem;
-
- cursor: pointer;
- `,
-};
diff --git a/apps/desktop/src/@components/forgotPassword/forgotPasswordInput.tsx b/apps/desktop/src/@components/forgotPassword/forgotPasswordInput.tsx
index cd2524e66..663d5eb40 100644
--- a/apps/desktop/src/@components/forgotPassword/forgotPasswordInput.tsx
+++ b/apps/desktop/src/@components/forgotPassword/forgotPasswordInput.tsx
@@ -1,36 +1,33 @@
-import { useEffect, useState } from "react";
-import { useForm } from "react-hook-form";
-import styled, { css } from "styled-components";
-import { RequestBlackTextIc, RequestWhiteTextIc, ResendTextIc } from "../../assets";
-import { EMAIL_MESSAGE } from "../../core/signUp/errorMessage";
-import { useResetPassword } from "../../hooks/queries/user";
-import { theme } from "../../style/theme";
-import { UserType } from "../../type/common/userType";
-import { EmailPasswordInputType } from "../../type/signUp/inputType";
-import { Switch } from "../@common/switch";
-import { FormContainer, InputContainer100, InputTitle } from "../@common/styledComponents";
-import { RequestPasswordButtonType } from "../../type/user";
-import { CHECK_EMAIL_FORM } from "../../core/signUp/checkForm";
+import styled, { css } from 'styled-components';
+import { useEffect, useState } from 'react';
+import { useForm } from 'react-hook-form';
+import { RequestBlackTextIc, RequestWhiteTextIc, ResendTextIc } from '../../assets';
+import { EMAIL_MESSAGE } from '../../core/signUp/errorMessage';
+import { useResetPassword } from '../../hooks/queries/user';
+import { theme } from '../../style/theme';
+import { UserType } from '../../type/common/userType';
+import { Switch } from '../@common/switch';
+import { FormContainer, InputContainer100, InputTitle } from '../@common/layout/styledComponents';
+import { RequestPasswordButtonType } from '../../type/user';
+import { CHECK_EMAIL_FORM } from '../../core/signUp/checkForm';
export default function ForgotPasswordInput() {
const methods = useForm({
defaultValues: {
- email: "",
+ email: '',
},
});
const {
register,
setError,
- formState: { errors, isDirty, isValid },
+ formState: { isDirty, isValid },
handleSubmit,
} = methods;
-
const { data, resetPassword } = useResetPassword(setError);
-
- const [userType, setUserType] = useState("vocal");
+ const [userType, setUserType] = useState('vocal');
const [buttonType, setButtonType] = useState({
isActive: false,
- text: "Request a password reset",
+ text: 'Request a password reset',
});
function handleRequestResetPassword(email: string) {
@@ -38,16 +35,16 @@ export default function ForgotPasswordInput() {
}
function switchUseryType() {
- userType === "producer" ? setUserType("vocal") : setUserType("producer");
+ userType === 'producer' ? setUserType('vocal') : setUserType('producer');
}
useEffect(() => {
if (data?.success) {
- setButtonType({ isActive: true, text: "Resend" });
+ setButtonType({ isActive: true, text: 'Resend' });
}
if (isDirty && isValid) {
- setButtonType({ isActive: true, text: "Request a password reset" });
+ setButtonType({ isActive: true, text: 'Request a password reset' });
}
}, [data, isDirty, isValid]);
@@ -64,7 +61,7 @@ export default function ForgotPasswordInput() {
{buttonType.isActive ? (
- buttonType.text === "Resend" ? (
+ buttonType.text === 'Resend' ? (
) : (
@@ -141,7 +138,7 @@ const SendButton = styled.button<{ userType: UserType; isActive: boolean }>`
border-radius: 3.35rem;
${({ userType, isActive }) =>
- userType === "producer" &&
+ userType === 'producer' &&
(isActive
? css`
color: ${({ theme }) => theme.colors.white};
@@ -153,7 +150,7 @@ const SendButton = styled.button<{ userType: UserType; isActive: boolean }>`
`)}
${({ userType, isActive }) =>
- userType === "vocal" &&
+ userType === 'vocal' &&
(isActive
? css`
color: ${({ theme }) => theme.colors.white};
diff --git a/apps/desktop/src/@components/forgotPassword/index.tsx b/apps/desktop/src/@components/forgotPassword/index.tsx
index 1d7d266c6..727d35799 100644
--- a/apps/desktop/src/@components/forgotPassword/index.tsx
+++ b/apps/desktop/src/@components/forgotPassword/index.tsx
@@ -1,15 +1,15 @@
-import styled from "styled-components";
-import BackgroundImg from "../../assets/image/backgroundImg.png";
-import BackButton from "../@common/backButton";
-import Footer from "../@common/footer";
-import Header from "../@common/header";
-import ForgotPasswordInput from "./forgotPasswordInput";
+import styled from 'styled-components';
+import BackgroundImg from '../../assets/image/backgroundImg.png';
+import BackButton from '../@common/button/backButton';
+import Footer from '../@common/layout/footer';
+import Header from '../@common/layout/header';
+import ForgotPasswordInput from './forgotPasswordInput';
export default function ForgotPasswordContainer() {
return (
<>
diff --git a/apps/desktop/src/@components/@common/passwordContainer.tsx b/apps/desktop/src/@components/forgotPassword/passwordContainer.tsx
similarity index 92%
rename from apps/desktop/src/@components/@common/passwordContainer.tsx
rename to apps/desktop/src/@components/forgotPassword/passwordContainer.tsx
index ca5acfd3b..03e981521 100644
--- a/apps/desktop/src/@components/@common/passwordContainer.tsx
+++ b/apps/desktop/src/@components/forgotPassword/passwordContainer.tsx
@@ -1,6 +1,6 @@
-import { ReactNode } from "react";
-import styled from "styled-components";
-import { theme } from "../../style/theme";
+import styled from 'styled-components';
+import { ReactNode } from 'react';
+import { theme } from '../../style/theme';
interface PasswordContainerProps {
height: number;
diff --git a/apps/desktop/src/@components/login/loginForm.tsx b/apps/desktop/src/@components/login/loginForm.tsx
index bc7aaaf16..1e319358f 100644
--- a/apps/desktop/src/@components/login/loginForm.tsx
+++ b/apps/desktop/src/@components/login/loginForm.tsx
@@ -1,16 +1,135 @@
+import styled from 'styled-components';
+import background from '../../assets/icon/signupBackgroundIc.svg';
+import Footer from '../@common/layout/footer';
+import InputContainer from '../@common/form/inputContainer';
+import SwitchToggle from './switchToggle';
import { useEffect, useState } from 'react';
import { useForm } from 'react-hook-form';
import { useNavigate } from 'react-router-dom';
-import styled from 'styled-components';
import { LoginButtonIc, PasswordEyeIc } from '../../assets';
-import background from '../../assets/icon/signupBackgroundIc.svg';
import { ROLE } from '../../core/common/roleType';
import { useLogin } from '../../hooks/queries/user';
import { UserType } from '../../type/common/userType';
-import Footer from '../@common/footer';
-import InputContainer from '../@common/inputContainer';
-import SwitchToggle from './switchToggle';
-import { CHECK_EMAIL_FORM, CHECK_PASSWORD_FORM } from '../../core/signUp/checkForm';
+import { CHECK_EMAIL_FORM } from '../../core/signUp/checkForm';
+
+export default function LoginForm() {
+ const {
+ register,
+ formState: { errors, isDirty },
+ setError,
+ clearErrors,
+ handleSubmit,
+ } = useForm({
+ mode: 'onChange',
+ defaultValues: {
+ email: '',
+ password: '',
+ },
+ });
+ const [userType, setUserType] = useState('vocal');
+ const [isPasswordVisible, setIsPasswordVisible] = useState(false);
+ const navigate = useNavigate();
+ const { login, error } = useLogin();
+
+ useEffect(() => {
+ if (error?.response?.data.message === '존재하지 않는 아이디입니다.') {
+ setError('email', {
+ type: 'value',
+ message: 'We don’t have an account with that email address.',
+ });
+ clearErrors('password');
+ }
+
+ if (error?.response?.data.message === '잘못된 비밀번호입니다.') {
+ setError('password', {
+ type: 'value',
+ message: 'Wrong password.',
+ });
+ clearErrors('email');
+ }
+ }, [error]);
+
+ function switchUserType() {
+ userType === 'producer' ? setUserType('vocal') : setUserType('producer');
+ }
+
+ function handleMoveToSignup() {
+ navigate('/signup');
+ }
+
+ function handleMoveToForgotPassword() {
+ navigate('/forgot-password');
+ }
+
+ function toggleHidePassword() {
+ setIsPasswordVisible((prev) => !prev);
+ }
+
+ return (
+ <>
+
+
+
+
+
+ >
+ );
+}
const Container = styled.section`
position: absolute;
@@ -156,122 +275,3 @@ const ForgotEmailText = styled.p`
cursor: pointer;
`;
-
-export default function LoginForm() {
- const {
- register,
- formState: { errors, isDirty },
- setError,
- clearErrors,
- handleSubmit,
- } = useForm({
- mode: 'onChange',
- defaultValues: {
- email: '',
- password: '',
- },
- });
- const [userType, setUserType] = useState('vocal');
- const navigate = useNavigate();
- const [isPasswordVisible, setIsPasswordVisible] = useState(false);
- const { login, error } = useLogin();
-
- useEffect(() => {
- if (error?.response?.data.message === '존재하지 않는 아이디입니다.') {
- setError('email', {
- type: 'value',
- message: 'We don’t have an account with that email address.',
- });
- clearErrors('password');
- }
-
- if (error?.response?.data.message === '잘못된 비밀번호입니다.') {
- setError('password', {
- type: 'value',
- message: 'Wrong password.',
- });
- clearErrors('email');
- }
- }, [error]);
-
- function switchUserType() {
- userType === 'producer' ? setUserType('vocal') : setUserType('producer');
- }
-
- function handleMoveToSignup() {
- navigate('/signup');
- }
-
- function handleMoveToForgotPassword() {
- navigate('/forgot-password');
- }
-
- function toggleHidePassword() {
- setIsPasswordVisible((prev) => !prev);
- }
-
- return (
- <>
-
-
-
-
-
- >
- );
-}
diff --git a/apps/desktop/src/@components/login/switchToggle.tsx b/apps/desktop/src/@components/login/switchToggle.tsx
index 84f3dce4b..8f04c89f7 100644
--- a/apps/desktop/src/@components/login/switchToggle.tsx
+++ b/apps/desktop/src/@components/login/switchToggle.tsx
@@ -1,14 +1,5 @@
-import styled from "styled-components";
-import { Switch } from "../@common/switch";
-
-const Container = styled.section`
- width: 55.9rem;
- display: flex;
- justify-content: flex-end;
- align-items: center;
-
- margin-top: 0.04rem;
-`;
+import styled from 'styled-components';
+import { Switch } from '../@common/switch';
interface SwitchToggleProps {
switchUserType: () => void;
@@ -28,3 +19,12 @@ export default function SwitchToggle(props: SwitchToggleProps) {
);
}
+
+const Container = styled.section`
+ width: 55.9rem;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+
+ margin-top: 0.04rem;
+`;
diff --git a/apps/desktop/src/@components/main/eventInfo.tsx b/apps/desktop/src/@components/main/eventInfo.tsx
deleted file mode 100644
index 786cf3f1e..000000000
--- a/apps/desktop/src/@components/main/eventInfo.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-import { useNavigate } from 'react-router-dom';
-import styled from 'styled-components';
-
-interface EventInfoProps {
- eventImage: string;
- eventTitle: string;
- eventPeriod: string;
- eventDday?: string;
- eventId: number;
-}
-
-export default function EventInfo(props: EventInfoProps) {
- const { eventImage, eventTitle, eventPeriod, eventDday, eventId } = props;
-
- const navigate = useNavigate();
-
- function handleMoveEventDetail() {
- navigate(`/event/${eventId}`);
- }
-
- return (
-
-
-
- {eventDday && {eventDday}}
-
- {eventTitle}
- {eventPeriod}
-
- );
-}
-
-const Styled = {
- Container: styled.article`
- display: flex;
- flex-direction: column;
-
- width: 83.5rem;
- `,
-
- EventImageWrapper: styled.div`
- position: relative;
-
- width: 83.5rem;
- height: 83.5rem;
-
- overflow: hidden;
- object-fit: cover;
- `,
-
- EventImage: styled.img`
- width: 100%;
- cursor: pointer;
- `,
-
- EventTitle: styled.h3`
- ${({ theme }) => theme.fonts.pretendard_text30};
- color: ${({ theme }) => theme.colors.white};
-
- margin: 4rem 0 2rem;
- `,
-
- EventPeriod: styled.p`
- ${({ theme }) => theme.fonts.pretendard_text20};
- color: ${({ theme }) => theme.colors.gray2};
- `,
-
- DdayLabel: styled.div`
- position: absolute;
- top: 4rem;
- right: 4rem;
-
- padding: 1.8rem 3.1rem;
-
- ${({ theme }) => theme.fonts.pretendard_text25_700};
- color: ${({ theme }) => theme.colors.white};
-
- border-radius: 3.35rem;
- border: 0.2rem solid ${({ theme }) => theme.colors.white};
- background: rgba(0, 0, 0, 0.3);
- backdrop-filter: blur(2px);
- `,
-};
diff --git a/apps/desktop/src/@components/main/eventSection.tsx b/apps/desktop/src/@components/main/eventSection.tsx
deleted file mode 100644
index 3ab0edb61..000000000
--- a/apps/desktop/src/@components/main/eventSection.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import styled from 'styled-components';
-import EventInfo from './eventInfo';
-import { useNavigate } from 'react-router-dom';
-import { useGetEventList } from '../../hooks/queries/admin/event';
-
-export default function EventSection() {
- const { eventListData } = useGetEventList({
- page: 1,
- limit: 2,
- });
-
- const navigate = useNavigate();
-
- function handleMoveEventPage() {
- navigate('/event');
- }
-
- return (
-
-
- Hot Events here
- more
-
-
-
- {eventListData?.map((event) => (
-
- ))}
-
-
- );
-}
-
-export const CommonSectionStyled = {
- SectionContainer: styled.section`
- width: 100%;
-
- padding: 0 10rem;
-
- margin-bottom: 20rem;
- `,
-
- HeadingWrapper: styled.div`
- display: flex;
- justify-content: space-between;
-
- width: 100%;
- height: 4.6rem;
-
- margin-bottom: 5rem;
- `,
-
- HeadingText: styled.h2`
- ${({ theme }) => theme.fonts.alexandria_heading38};
- color: ${({ theme }) => theme.colors.white};
-
- white-space: pre-line;
- `,
-
- ShowMoreText: styled.p`
- ${({ theme }) => theme.fonts.text22};
- color: ${({ theme }) => theme.colors.gray3};
-
- cursor: pointer;
-
- text-decoration: underline;
- text-underline-offset: 0.3rem;
-
- margin-top: 1.4rem;
- `,
-
- EventInfoWrapper: styled.div`
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- gap: 15rem 0;
-
- width: 100%;
-
- margin-top: 5rem;
- `,
-};
diff --git a/apps/desktop/src/@components/main/index.tsx b/apps/desktop/src/@components/main/index.tsx
index 9e7db1f5c..9b6b7e204 100644
--- a/apps/desktop/src/@components/main/index.tsx
+++ b/apps/desktop/src/@components/main/index.tsx
@@ -1,63 +1,13 @@
-import styled from 'styled-components';
-import RecentInfoSection from './recentInfoSection';
-import RecentTrackList from './recentTrackList';
-import RecentVocalList from './recentVocalList';
import MainBanner from './mainBanner';
-import EventSection from './eventSection';
-import { PlayerContext, PlayerProvider } from '../../context/playerContext';
-import Player from '../@common/player';
-import { useContext, useEffect } from 'react';
-import { useNavigate } from 'react-router-dom';
-import Footer from '../@common/footer';
+import Footer from '../@common/layout/footer';
import MainHeader from './mainHeader';
-import { PopupModal } from '../@common/Modal';
-import { getCookie } from '../../utils/common/cookie';
export default function MainPageContainer() {
- const { quitAudioForMovePage } = useContext(PlayerContext);
- const navigate = useNavigate();
-
- function handleMoveVocalSearch() {
- quitAudioForMovePage();
- navigate('/vocal-search');
- }
-
- function handleMoveTrackSearch() {
- quitAudioForMovePage();
- navigate('/track-search');
- }
-
-
return (
-
- {/*!getCookie('popup') &&*/}
- {/* HEADER */}
+ <>
- {/* MainBanner */}
- {/* Recnet Vocal-Searhcing List*/}
-
-
-
-
- {/* Recnet Vocal List*/}
-
-
-
-
- {/* Event Section */}
-
-
-
+ >
);
}
-
-const Styled = {
- DivisionLine: styled.hr`
- width: 100%;
-
- margin: 15rem 0;
- border: 0.1rem solid ${({ theme }) => theme.colors.gray4};
- `,
-};
diff --git a/apps/desktop/src/@components/main/loginBtn.tsx b/apps/desktop/src/@components/main/loginBtn.tsx
index 5195ba539..d1232b4e6 100644
--- a/apps/desktop/src/@components/main/loginBtn.tsx
+++ b/apps/desktop/src/@components/main/loginBtn.tsx
@@ -1,28 +1,20 @@
-import styled, { CSSProperties } from 'styled-components';
-import SamllButton from '../@common/button/customButton';
+import styled from 'styled-components';
+import useModal from '../../hooks/common/useModal';
+import ProfileBox from './profileBox';
import { theme } from '../../style/theme';
-import { useContext, useEffect } from 'react';
-import { PlayerContext } from '../../context/playerContext';
+import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import { loginUserData } from '../../recoil/common/loginUserData';
import { ROLE } from '../../core/common/roleType';
-import useModal from '../../hooks/common/useModal';
-import ProfileBox from './profileBox';
+import { PlayUseContext } from '../../context/playerContext';
export default function LoginBtn() {
- const { quitAudioForMovePage } = useContext(PlayerContext);
-
+ const { quitAudioForMovePage } = PlayUseContext({});
const userData = useRecoilValue(loginUserData);
-
const { openModal, unShowModal, handleShowUpdateModal } = useModal();
-
const navigate = useNavigate();
- useEffect(() => {
- unShowModal();
- }, []);
-
function handleMoveToLogin() {
quitAudioForMovePage();
navigate('/login', {
@@ -37,89 +29,88 @@ export default function LoginBtn() {
navigate('/signup');
}
+ useEffect(() => {
+ unShowModal();
+ }, []);
+
return (
-
- {userData.userId > 0 ? (
-
-
+
+ {userData.userId !== -1 ? (
+
+
{userData.userName}
{openModal && }
-
+
) : (
<>
-
- Login
-
-
- Sign up
-
+ Login
+ Sign up
>
)}
-
+
);
}
-const Styled = {
- LoginBtnWrapper: styled.div`
- display: flex;
+const LoginButton = styled.button`
+ font-family: Pretendard;
+ font-weight: 500;
+ font-size: 2.2rem;
+ line-height: normal;
- cursor: pointer;
- `,
+ width: 17.6rem;
+ height: 4.9rem;
- LoginedInfoWrapper: styled.div<{ userType: string }>`
- display: flex;
- align-items: center;
- min-width: 19.5rem;
+ color: ${({ theme }) => theme.colors.white};
+ background: ${({ theme }) => theme.colors.black};
- width: 100%;
- height: 100%;
+ border: 0.1rem solid ${({ theme }) => theme.colors.white};
+ border-radius: 3rem;
+`;
- color: ${(props) => (props.userType === ROLE.PRODUCER ? theme.colors.sub1 : theme.colors.sub2)};
- ${({ theme }) => theme.fonts.pretendard_text22};
- `,
+const SignupButton = styled.button`
+ font-family: Pretendard;
+ font-weight: 500;
+ font-size: 2.2rem;
+ line-height: normal;
- LoginedUserImage: styled.img<{ userType: string }>`
- width: 5rem;
- height: 5rem;
+ width: 17.6rem;
+ height: 4.9rem;
- margin-right: 1rem;
+ color: ${({ theme }) => theme.colors.black};
+ background: ${({ theme }) => theme.colors.white};
- border-radius: 50%;
+ border: 0.1rem solid ${({ theme }) => theme.colors.white};
+ border-radius: 3rem;
- border: 0.2rem solid;
- border-color: ${(props) => (props.userType === ROLE.PRODUCER ? theme.colors.sub1 : theme.colors.sub3)};
- `,
-};
+ margin-left: 1.2rem;
+`;
-const LoginBtnStyle: CSSProperties = {
- fontFamily: 'Pretendard',
- fontWeight: 500,
- fontSize: '2.2rem',
- lineHeight: 'normal',
+const LoginBtnWrapper = styled.div`
+ display: flex;
- width: '17.6rem',
- height: '4.9rem',
+ cursor: pointer;
+`;
- color: `${theme.colors.white}`,
- background: `${theme.colors.black}`,
+const LoginedInfoWrapper = styled.div<{ userType: string }>`
+ display: flex;
+ align-items: center;
+ min-width: 19.5rem;
- border: `0.1rem solid ${theme.colors.white}`,
- borderRadius: '3rem',
-};
+ width: 100%;
+ height: 100%;
-const SignupBtnStyle: CSSProperties = {
- fontFamily: 'Pretendard',
- fontWeight: 500,
- fontSize: '2.2rem',
- lineHeight: 'normal',
+ color: ${(props) => (props.userType === ROLE.PRODUCER ? theme.colors.sub1 : theme.colors.sub2)};
+ ${({ theme }) => theme.fonts.pretendard_text22};
+`;
- width: '17.6rem',
- height: '4.9rem',
+const LoginedUserImage = styled.img<{ userType: string }>`
+ width: 5rem;
+ height: 5rem;
- color: `${theme.colors.black}`,
+ margin-right: 1rem;
- background: `${theme.colors.white}`,
- borderRadius: '3rem',
+ border-radius: 50%;
- marginLeft: '2rem',
-};
+ border: 0.2rem solid;
+ border-color: ${(props) => (props.userType === ROLE.PRODUCER ? theme.colors.sub1 : theme.colors.sub3)};
+`;
diff --git a/apps/desktop/src/@components/main/mainBanner.tsx b/apps/desktop/src/@components/main/mainBanner.tsx
index 2288ac97f..7e3f30297 100644
--- a/apps/desktop/src/@components/main/mainBanner.tsx
+++ b/apps/desktop/src/@components/main/mainBanner.tsx
@@ -1,27 +1,16 @@
-import { useContext, useEffect, useState } from 'react';
-import styled, { CSSProperties } from 'styled-components';
-import CustomButton from '../@common/button/customButton';
-import { theme } from '../../style/theme';
-import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
import mainBannerImg from '../../assets/image/mainBannerBackgroundImg.png';
-import { PlayerContext } from '../../context/playerContext';
+import { useEffect, useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import { PlayUseContext } from '../../context/playerContext';
export default function MainBanner() {
const bannerTexts = ['Tracks', 'Chance', 'Inspiration'];
- const [textIndex, setTextIndex] = useState(0);
-
- const { quitAudioForMovePage } = useContext(PlayerContext);
+ const [textIndex, setTextIndex] = useState(0);
+ const { quitAudioForMovePage } = PlayUseContext({});
const navigate = useNavigate();
- useEffect(() => {
- const interval = setInterval(() => {
- textIndex === 2 ? setTextIndex(0) : setTextIndex(textIndex + 1);
- }, 4000);
-
- return () => clearInterval(interval);
- }, [textIndex]);
-
function handleMoveVocalSearch() {
quitAudioForMovePage();
navigate('/vocal-search');
@@ -36,193 +25,199 @@ export default function MainBanner() {
navigate('/signup');
}
+ useEffect(() => {
+ const interval = setInterval(() => {
+ textIndex === 2 ? setTextIndex(0) : setTextIndex(textIndex + 1);
+ }, 4000);
+ return () => clearInterval(interval);
+ }, [textIndex]);
+
return (
-
-
-
+
+
+
{'DISCOVER\nYOUR'}
-
+
{'LIMITLESS ('}
- {bannerTexts[textIndex]}
+ {bannerTexts[textIndex]}
{')'}
-
-
-
-
- {'◀ Track'}
-
-
- {'Sing up for free'}
-
-
- {'Vocal ▶'}
-
-
-
-
-
+
+
+
+
+ {'◀ Track'}
+
+ {'Sing up for free'}
+
+ {'Vocal ▶'}
+
+
+
+
+
{`Track-1 offers a platform for you to freely express your musical potential.\nDiscover your collaborative musicians on Track-1 now.`}
-
-
-
+
+
+
);
}
-const btnStyle: CSSProperties = {
- fontFamily: 'Alexandria',
- fontWeight: 400,
- fontSize: '2.5rem',
- lineHeight: 'normal',
+const SignUpButton = styled.button`
+ display: flex;
+ justify-content: center;
+ align-items: center;
- width: '27.6rem',
- height: '6.8rem',
+ font-family: 'Alexandria';
+ font-weight: 400;
+ font-size: 2.5rem;
+ line-height: normal;
- color: `${theme.colors.white}`,
+ width: 27.6rem;
+ height: 6.8rem;
- backgroundColor: `${theme.colors.main}`,
- borderRadius: '3.55rem',
-};
+ color: ${({ theme }) => theme.colors.white};
+ background-color: ${({ theme }) => theme.colors.main};
+ border-radius: 3.55rem;
+`;
-const Styled = {
- Container: styled.section`
- width: 100%;
+const Container = styled.section`
+ width: 100%;
- margin-bottom: 14.3rem;
- `,
+ margin-bottom: 14.3rem;
+`;
- BannerWrapper: styled.div`
- display: flex;
- flex-direction: column;
+const BannerWrapper = styled.div`
+ display: flex;
+ flex-direction: column;
- align-items: center;
+ align-items: center;
- width: 100%;
- height: 109.9rem;
+ width: 100%;
+ height: 109.9rem;
- background: url(${mainBannerImg});
- background-repeat: no-repeat;
- background-size: cover;
- `,
+ background: url(${mainBannerImg});
+ background-repeat: no-repeat;
+ background-size: cover;
+`;
- BannerText: styled.h1`
- text-align: center;
+const BannerText = styled.h1`
+ text-align: center;
- padding-top: 22.1rem;
+ padding-top: 22.1rem;
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_heading90};
+ color: ${({ theme }) => theme.colors.white};
+ ${({ theme }) => theme.fonts.alexandria_heading90};
- white-space: pre-line;
- `,
+ white-space: pre-line;
+`;
- BannerMenuWrapper: styled.ul`
- position: relative;
+const BannerMenuWrapper = styled.ul`
+ position: relative;
- display: flex;
- justify-content: space-between;
- align-items: center;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
- width: 107.3rem;
+ width: 107.3rem;
- margin: 9.5rem 0;
- padding: 0 2.5rem;
- `,
- BannerSignupButtonWrapper: styled.div`
- position: absolute;
- left: 39.8rem;
- `,
+ margin: 9.5rem 0;
+ padding: 0 2.5rem;
+`;
+const BannerSignupButtonWrapper = styled.div`
+ position: absolute;
+ left: 39.8rem;
+`;
- BannerTrackMenu: styled.li`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_text30};
+const BannerTrackMenu = styled.li`
+ color: ${({ theme }) => theme.colors.white};
+ ${({ theme }) => theme.fonts.alexandria_text30};
- cursor: pointer;
+ cursor: pointer;
- :hover {
- color: ${({ theme }) => theme.colors.sub1};
+ :hover {
+ color: ${({ theme }) => theme.colors.sub1};
- animation-name: slide-left-side;
- animation-duration: 0.5s;
- animation-duration: linear;
- animation-iteration-count: 2;
- animation-direction: alternate;
- animation-fill-mode: forwards;
- }
+ animation-name: slide-left-side;
+ animation-duration: 0.5s;
+ animation-duration: linear;
+ animation-iteration-count: 2;
+ animation-direction: alternate;
+ animation-fill-mode: forwards;
+ }
- @keyframes slide-left-side {
- 0% {
- margin-left: 0;
- }
- 100% {
- margin-left: 2.5rem;
- }
+ @keyframes slide-left-side {
+ 0% {
+ margin-left: 0;
}
- `,
+ 100% {
+ margin-left: 2.5rem;
+ }
+ }
+`;
- BannerVocalMenu: styled.li`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.alexandria_text30};
+const BannerVocalMenu = styled.li`
+ color: ${({ theme }) => theme.colors.white};
+ ${({ theme }) => theme.fonts.alexandria_text30};
- cursor: pointer;
+ cursor: pointer;
- :hover {
- color: ${({ theme }) => theme.colors.sub2};
+ :hover {
+ color: ${({ theme }) => theme.colors.sub2};
- animation-name: slide-right-side;
- animation-duration: 0.5s;
- animation-duration: linear;
- animation-iteration-count: 2;
- animation-direction: alternate;
- animation-fill-mode: forwards;
+ animation-name: slide-right-side;
+ animation-duration: 0.5s;
+ animation-duration: linear;
+ animation-iteration-count: 2;
+ animation-direction: alternate;
+ animation-fill-mode: forwards;
+ }
+
+ @keyframes slide-right-side {
+ 0% {
+ margin-right: 0;
+ }
+ 100% {
+ margin-right: 2.5rem;
}
+ }
+`;
+
+const DivisionLine = styled.hr`
+ width: 152.6rem;
+ border: 0.2rem solid ${({ theme }) => theme.colors.white};
+`;
+
+const BannerNoticeText = styled.h4`
+ text-align: center;
+ white-space: pre-line;
+
+ margin-top: 4rem;
+
+ color: ${({ theme }) => theme.colors.white};
+ ${({ theme }) => theme.fonts.pretendard_text22};
+`;
+const AnimateTextWrapper = styled.div`
+ display: flex;
+ justify-content: space-between;
- @keyframes slide-right-side {
- 0% {
- margin-right: 0;
- }
- 100% {
- margin-right: 2.5rem;
- }
+ width: 102.5rem;
+`;
+
+const AnimateText = styled.span`
+ width: 47.4rem;
+
+ text-align: center;
+ animation: animated-text 4s infinite;
+
+ @keyframes animated-text {
+ 0% {
+ opacity: 0;
}
- `,
-
- DivisionLine: styled.hr`
- width: 152.6rem;
- border: 0.2rem solid ${({ theme }) => theme.colors.white};
- `,
-
- BannerNoticeText: styled.h4`
- text-align: center;
- white-space: pre-line;
-
- margin-top: 4rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.pretendard_text22};
- `,
- AnimateTextWrapper: styled.div`
- display: flex;
- justify-content: space-between;
-
- width: 102.5rem;
- `,
-
- AnimateText: styled.span`
- width: 47.4rem;
-
- text-align: center;
- animation: animated-text 4s infinite;
-
- @keyframes animated-text {
- 0% {
- opacity: 0;
- }
- 50% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
+ 50% {
+ opacity: 1;
}
- `,
-};
+ 100% {
+ opacity: 0;
+ }
+ }
+`;
diff --git a/apps/desktop/src/@components/main/mainHeader.tsx b/apps/desktop/src/@components/main/mainHeader.tsx
index e74c549f9..2ccf09966 100644
--- a/apps/desktop/src/@components/main/mainHeader.tsx
+++ b/apps/desktop/src/@components/main/mainHeader.tsx
@@ -1,15 +1,14 @@
import styled, { CSSProperties } from 'styled-components';
-import Header from '../@common/header';
-import { MainLogoWhiteIc } from '../../assets';
+import Header from '../@common/layout/header';
+import LoginBtn from './loginBtn';
import MainNav from './mainNav';
-import { useContext } from 'react';
-import { PlayerContext } from '../../context/playerContext';
+import { MainLogoWhiteIc } from '../../assets';
import { useNavigate } from 'react-router-dom';
-import LoginBtn from './loginBtn';
import { theme } from '../../style/theme';
+import { PlayUseContext } from '../../context/playerContext';
export default function MainHeader() {
- const { quitAudioForMovePage } = useContext(PlayerContext);
+ const { quitAudioForMovePage } = PlayUseContext({});
const navigate = useNavigate();
function handleMoveHome() {
diff --git a/apps/desktop/src/@components/main/mainNav.tsx b/apps/desktop/src/@components/main/mainNav.tsx
index aa3b90a11..1db169b7e 100644
--- a/apps/desktop/src/@components/main/mainNav.tsx
+++ b/apps/desktop/src/@components/main/mainNav.tsx
@@ -1,5 +1,5 @@
-import { useNavigate } from "react-router-dom";
-import styled from "styled-components";
+import styled from 'styled-components';
+import { useNavigate } from 'react-router-dom';
interface MainNavProps {
handleMoveTrackSearch: () => void;
@@ -11,87 +11,83 @@ export default function MainNav(props: MainNavProps) {
const navigate = useNavigate();
function handleMoveEventPage() {
- navigate("/event");
+ navigate('/event');
}
function handleMoveAboutPage() {
- navigate("/about");
+ navigate('/about');
}
return (
-
-
- About
- Event
-
-
-
-
-
-
+
+
+ About
+ Event
+
+
+
+
Tracks
-
-
+
+
Vocals
-
-
-
+
+
+
);
}
-const Styled = {
- NavMenuContainer: styled.nav`
- display: flex;
- justify-content: space-between;
- align-items: center;
+const NavMenuContainer = styled.nav`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
- margin-left: 10rem;
+ margin-left: 10rem;
- color: ${({ theme }) => theme.colors.gray2};
- ${({ theme }) => theme.fonts.pretendard_text22};
- `,
+ color: ${({ theme }) => theme.colors.gray2};
+ ${({ theme }) => theme.fonts.pretendard_text22};
+`;
- NavMenuWrapper: styled.ul`
- display: flex;
+const NavMenuWrapper = styled.ul`
+ display: flex;
- li {
- &:last-child {
- margin: 0;
- }
+ li {
+ &:last-child {
+ margin: 0;
}
- `,
+ }
+`;
- NavMenu: styled.li`
- display: flex;
- align-items: center;
- margin-right: 8rem;
+const NavMenu = styled.li`
+ display: flex;
+ align-items: center;
+ margin-right: 8rem;
- cursor: pointer;
+ cursor: pointer;
- :hover {
- color: ${({ theme }) => theme.colors.white};
- }
+ :hover {
+ color: ${({ theme }) => theme.colors.white};
+ }
- &.nav-track {
- :hover {
- color: ${({ theme }) => theme.colors.sub1};
- }
+ &.nav-track {
+ :hover {
+ color: ${({ theme }) => theme.colors.sub1};
}
+ }
- &.nav-vocal {
- :hover {
- color: ${({ theme }) => theme.colors.sub2};
- }
+ &.nav-vocal {
+ :hover {
+ color: ${({ theme }) => theme.colors.sub2};
}
- `,
+ }
+`;
- DivisionLine: styled.hr`
- width: 2.4rem;
+const DivisionLine = styled.hr`
+ width: 2.4rem;
- margin: 0 5rem;
+ margin: 0 5rem;
- border: 0.1rem solid ${({ theme }) => theme.colors.gray2};
+ border: 0.1rem solid ${({ theme }) => theme.colors.gray2};
- transform: rotate(90deg);
- `,
-};
+ transform: rotate(90deg);
+`;
diff --git a/apps/desktop/src/@components/main/profileBox.tsx b/apps/desktop/src/@components/main/profileBox.tsx
index c5cc500b2..cefb2b0f0 100644
--- a/apps/desktop/src/@components/main/profileBox.tsx
+++ b/apps/desktop/src/@components/main/profileBox.tsx
@@ -1,17 +1,15 @@
+import styled from 'styled-components';
import { useLocation, useNavigate } from 'react-router-dom';
import { useRecoilValue, useResetRecoilState } from 'recoil';
-import styled from 'styled-components';
import { ROLE } from '../../core/common/roleType';
-
import { loginUserData } from '../../recoil/common/loginUserData';
import { getLogout } from '../../api/user';
import { removeCookie } from '../../utils/common/cookie';
export default function ProfileBox() {
- const navigate = useNavigate();
const prevURL = useLocation().pathname;
-
const userData = useRecoilValue(loginUserData);
+ const navigate = useNavigate();
const resetLoginUserData = useResetRecoilState(loginUserData);
async function handleLogout() {
@@ -40,95 +38,93 @@ export default function ProfileBox() {
}
return (
-
-
-
- {userData.userName}
- {userData.userContact}
-
-
- {userData.userType}
-
-
-
- Logout
-
-
+
+
+
+ {userData.userName}
+ {userData.userContact}
+
+
+ {userData.userType}
+
+
+
+ Logout
+
+
);
}
-const Styled = {
- ProfileBoxContainer: styled.div`
- position: absolute;
+const ProfileBoxContainer = styled.div`
+ position: absolute;
- top: 12.4rem;
- right: 7rem;
+ top: 12.4rem;
+ right: 7rem;
- width: 37.1rem;
- height: 16.5rem;
+ width: 37.1rem;
+ height: 16.5rem;
- border-radius: 1rem;
- background-color: ${({ theme }) => theme.colors.gray5};
+ border-radius: 1rem;
+ background-color: ${({ theme }) => theme.colors.gray5};
- cursor: pointer;
- `,
+ cursor: pointer;
+`;
- ProfileInfoWrapper: styled.div`
- display: flex;
- justify-content: space-between;
+const ProfileInfoWrapper = styled.div`
+ display: flex;
+ justify-content: space-between;
- width: 100%;
- height: 10.6rem;
+ width: 100%;
+ height: 10.6rem;
- padding: 2.5rem 2.5rem 2rem 2.5rem;
+ padding: 2.5rem 2.5rem 2rem 2.5rem;
- border-bottom: 0.1rem solid ${({ theme }) => theme.colors.gray3};
- `,
+ border-bottom: 0.1rem solid ${({ theme }) => theme.colors.gray3};
+`;
- ProfileContentWrapper: styled.div`
- display: flex;
- flex-direction: column;
+const ProfileContentWrapper = styled.div`
+ display: flex;
+ flex-direction: column;
- width: 25rem;
- `,
+ width: 25rem;
+`;
- ProfileUserTypeWrapper: styled.div`
- width: calc(100% - 25rem);
- `,
+const ProfileUserTypeWrapper = styled.div`
+ width: calc(100% - 25rem);
+`;
- UserNameText: styled.p`
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.id};
- `,
+const UserNameText = styled.p`
+ color: ${({ theme }) => theme.colors.white};
+ ${({ theme }) => theme.fonts.id};
+`;
- UserEmailText: styled.p`
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.description};
- `,
+const UserEmailText = styled.p`
+ color: ${({ theme }) => theme.colors.gray3};
+ ${({ theme }) => theme.fonts.description};
+`;
- UserTypeText: styled.p<{ userType: string }>`
- color: ${(props) =>
- props.userType === ROLE.PRODUCER ? ({ theme }) => theme.colors.sub1 : ({ theme }) => theme.colors.sub2};
- ${({ theme }) => theme.fonts.description};
- `,
+const UserTypeText = styled.p<{ userType: string }>`
+ color: ${(props) =>
+ props.userType === ROLE.PRODUCER ? ({ theme }) => theme.colors.sub1 : ({ theme }) => theme.colors.sub2};
+ ${({ theme }) => theme.fonts.description};
+`;
- LogoutWrapper: styled.button`
- display: flex;
- justify-content: center;
- align-items: center;
+const LogoutWrapper = styled.button`
+ display: flex;
+ justify-content: center;
+ align-items: center;
- width: 100%;
- height: 5.7rem;
+ width: 100%;
+ height: 5.7rem;
- padding: 0.9rem 2rem;
- `,
+ padding: 0.9rem 2rem;
+`;
- LogoutText: styled.p`
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.description};
+const LogoutText = styled.p`
+ color: ${({ theme }) => theme.colors.gray3};
+ ${({ theme }) => theme.fonts.description};
- text-decoration: underline;
+ text-decoration: underline;
- cursor: pointer;
- `,
-};
+ cursor: pointer;
+`;
diff --git a/apps/desktop/src/@components/main/recentInfoSection.tsx b/apps/desktop/src/@components/main/recentInfoSection.tsx
deleted file mode 100644
index f20a65e21..000000000
--- a/apps/desktop/src/@components/main/recentInfoSection.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { PropsWithChildren } from 'react';
-import styled from 'styled-components';
-import { CommonSectionStyled } from './eventSection';
-
-interface RecentTrackSectionProps {
- headingText: string;
- handleMoveToMore: () => void;
-}
-
-export default function RecentInfoSection(props: PropsWithChildren) {
- const { headingText, handleMoveToMore, children } = props;
-
- return (
-
-
- {headingText}
- more
-
- {children}
-
- );
-}
-
-const Styled = {
- ChildrenWrapper: styled.div`
- width: 135rem;
-
- margin-top: -1.8rem;
-
- padding-left: 36.9rem;
-
- width: 100%;
-
- /* padding: 0 10rem; */
- `,
-
- HeadingTextWrapper: styled.div`
- width: 36.9rem;
- height: 100%;
- `,
-
- HeadingText: styled.h2`
- width: 36.9rem;
- height: 100%;
-
- ${({ theme }) => theme.fonts.alexandria_heading38};
- color: ${({ theme }) => theme.colors.white};
-
- white-space: pre-line;
- `,
-
- ShowMoreWrapper: styled.div`
- width: 100%;
- display: flex;
- justify-content: right;
-
- margin-top: 1.2rem;
- margin-bottom: 5rem;
-
- ${({ theme }) => theme.fonts.text22};
- color: ${({ theme }) => theme.colors.gray3};
-
- cursor: pointer;
- `,
-
- ShowMoreText: styled.p`
- text-decoration: underline;
- text-underline-offset: 0.3rem;
- `,
-
- TrackSectionWrapper: styled.article`
- width: 100%;
- height: 100%;
- `,
-};
diff --git a/apps/desktop/src/@components/main/recentTrackItem.tsx b/apps/desktop/src/@components/main/recentTrackItem.tsx
deleted file mode 100644
index 8d7ac6c9c..000000000
--- a/apps/desktop/src/@components/main/recentTrackItem.tsx
+++ /dev/null
@@ -1,188 +0,0 @@
-import styled, { css } from 'styled-components';
-import { FilteredTrackType } from '../../type/tracks';
-import { useContext, useEffect } from 'react';
-import usePlaySelectedTrack from '../../hooks/common/usePlaySelectedTrack';
-import { PlayerContext } from '../../context/playerContext';
-import { PauseIc, PlayIc } from '../../assets';
-import { useLocation, useNavigate } from 'react-router-dom';
-
-interface RecentTrackItemProps {
- trackInfo: FilteredTrackType;
- playingTrack: FilteredTrackType['trackId'] | null;
- selectTrack: (trackId: FilteredTrackType['trackId']) => void;
-}
-
-export default function RecentTrackItem(props: RecentTrackItemProps) {
- const { trackInfo, playingTrack, selectTrack } = props;
-
- const isSelected = playingTrack === trackInfo.trackId;
- const { contextPlaying, getPlayerInfo, showPlayer, quitAudioForMovePage, ...playerContext } =
- useContext(PlayerContext);
-
- const { innerPlaying, isHovered, playAudioItem, stopAudioItem, hoverTrack, unhoverTrack } = usePlaySelectedTrack(
- playerContext,
- trackInfo.trackAudioFile,
- trackInfo.trackId,
- selectTrack
- );
-
- const navigate = useNavigate();
- const prevURL = useLocation().pathname;
-
- useEffect(() => {
- if (!isSelected) return;
-
- getPlayerInfo({
- imageFile: trackInfo.trackImageFile,
- title: trackInfo.trackTitle,
- userName: trackInfo.trackUserName,
- });
- }, [playingTrack]);
-
- function handleMoveToDetailPage() {
- quitAudioForMovePage();
- navigate(`/track-post/${trackInfo.trackId}`, {
- state: {
- prevURL: prevURL,
- },
- });
- }
-
- return (
-
-
-
-
- {(isHovered || (isSelected && showPlayer)) &&
- (innerPlaying && contextPlaying ? (
- <>
-
- {trackInfo.trackKeyword.map((keyword) => (
- #{keyword}
- ))}
-
-
- >
- ) : (
- <>
-
- {trackInfo.trackKeyword.map((keyword) => (
- #{keyword}
- ))}
-
-
- >
- ))}
-
- {trackInfo.trackCategory}
- {trackInfo.trackTitle}
- {trackInfo.trackUserName}
-
- );
-}
-
-const Styled = {
- Container: styled.article`
- display: flex;
- flex-direction: column;
-
- cursor: pointer;
- `,
-
- TrackImageWrapper: styled.div<{ isHovered: boolean }>`
- position: relative;
-
- display: flex;
-
- width: 30rem;
- height: 30rem;
-
- overflow: hidden;
- cursor: pointer;
-
- margin-bottom: 3rem;
-
- ${({ isHovered }) =>
- isHovered &&
- css`
- ::before {
- position: absolute;
- top: 0;
- right: 0;
-
- content: '';
- width: 100%;
- height: 100%;
-
- background-color: rgba(0, 0, 0, 0.75); /* 원하는 색상과 투명도를 설정 */
- }
- `}
- `,
-
- TrackImage: styled.img`
- width: 100%;
- height: 100%;
-
- object-fit: cover;
- `,
-
- TrackCategory: styled.p`
- margin-bottom: 1.5rem;
-
- color: ${({ theme }) => theme.colors.sub1};
- ${({ theme }) => theme.fonts.pretendard_text20};
- `,
-
- TrackTitle: styled.p`
- margin-bottom: 2rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.pretendard_text22};
-
- :hover {
- color: ${({ theme }) => theme.colors.sub1};
- }
- `,
-
- TrackKeywordWrapper: styled.div`
- position: absolute;
- left: 3.5rem;
- top: 3.5rem;
- `,
-
- TrackKeyword: styled.p`
- margin-bottom: 1rem;
-
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.pretendard_text20};
- `,
-
- UserName: styled.p`
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.pretendard_text20};
- `,
-
- PlayIcon: styled(PlayIc)`
- position: absolute;
-
- right: 3.5rem;
- bottom: 3.5rem;
-
- width: 3.4rem;
-
- cursor: pointer;
- `,
- PauseIcon: styled(PauseIc)`
- position: absolute;
-
- right: 3.5rem;
- bottom: 3.5rem;
-
- width: 3rem;
-
- cursor: pointer;
- `,
-};
diff --git a/apps/desktop/src/@components/main/recentTrackList.tsx b/apps/desktop/src/@components/main/recentTrackList.tsx
deleted file mode 100644
index 83598b5af..000000000
--- a/apps/desktop/src/@components/main/recentTrackList.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import styled from 'styled-components';
-import { useGetRecentTracks } from '../../hooks/queries/tracks';
-import { FilteredTrackType } from '../../type/tracks';
-import { useState } from 'react';
-import RecentTrackItem from './recentTrackItem';
-
-export default function RecentTrackList() {
- const { recentTrackInfo } = useGetRecentTracks(4);
- const [playingTrack, setPLayingTrack] = useState(null);
-
- function selectTrack(trackId: FilteredTrackType['trackId']) {
- setPLayingTrack(trackId);
- }
-
- if (recentTrackInfo === undefined) return null;
-
- return (
-
- {recentTrackInfo?.map((trackInfo) => (
-
- ))}
-
- );
-}
-
-const Styled = {
- Container: styled.div`
- display: flex;
- justify-content: space-between;
- `,
-};
diff --git a/apps/desktop/src/@components/main/recentVocalItem.tsx b/apps/desktop/src/@components/main/recentVocalItem.tsx
deleted file mode 100644
index 9e343afae..000000000
--- a/apps/desktop/src/@components/main/recentVocalItem.tsx
+++ /dev/null
@@ -1,203 +0,0 @@
-import styled, { css } from 'styled-components';
-import { useContext, useEffect } from 'react';
-import { PlayerContext } from '../../context/playerContext';
-import usePlaySelectedTrack from '../../hooks/common/usePlaySelectedTrack';
-import { FilteredVocalType } from '../../type/vocals';
-import { PauseIc, PlayIc } from '../../assets';
-import { useLocation, useNavigate } from 'react-router-dom';
-
-interface RecentVocalItemProps {
- vocalInfo: FilteredVocalType;
- playingTrack: FilteredVocalType['userId'] | null;
- selectTrack: (trackId: FilteredVocalType['userId']) => void;
-}
-
-export default function RecentVocalItem(props: RecentVocalItemProps) {
- const { vocalInfo, playingTrack, selectTrack } = props;
- const isSelected = playingTrack === vocalInfo.userId;
- const { contextPlaying, getPlayerInfo, showPlayer, quitAudioForMovePage, ...playerContext } =
- useContext(PlayerContext);
-
- const { innerPlaying, isHovered, playAudioItem, stopAudioItem, hoverTrack, unhoverTrack } = usePlaySelectedTrack(
- playerContext,
- vocalInfo.userAudioFile,
- vocalInfo.userId,
- selectTrack
- );
-
- const navigate = useNavigate();
- const prevURL = useLocation().pathname;
-
- useEffect(() => {
- if (!isSelected) return;
-
- getPlayerInfo({
- imageFile: vocalInfo.userImageFile,
- title: vocalInfo.userTitle,
- userName: vocalInfo.userName,
- });
- }, [playingTrack]);
-
- function handleMoveToVocalProfile() {
- quitAudioForMovePage();
- navigate(`/vocal-profile/${vocalInfo.userId}`, {
- state: {
- prevURL: prevURL,
- },
- });
- }
-
- return (
-
-
-
-
- {(isHovered || (isSelected && showPlayer)) &&
- (innerPlaying && contextPlaying ? (
-
- ) : (
-
- ))}
-
-
-
-
-
- {vocalInfo.userCategory[0]}
- {vocalInfo.userCategory.length}
-
- {vocalInfo.userName}
- {vocalInfo.userKeyword.map((keyword) => (
- #{keyword}
- ))}
-
-
- );
-}
-
-const Styled = {
- Container: styled.li`
- display: flex;
-
- width: 45rem;
-
- cursor: pointer;
- `,
-
- TrackImageWrapper: styled.div`
- width: 20rem;
- height: 100%;
- `,
-
- TrackImageFrame: styled.div<{ isHovered: boolean }>`
- position: relative;
-
- display: flex;
- justify-content: center;
- align-items: center;
-
- width: 16.6rem;
- height: 16.6rem;
-
- border-radius: 50%;
-
- overflow: hidden;
- cursor: pointer;
-
- ${({ isHovered }) =>
- isHovered &&
- css`
- ::before {
- position: absolute;
- top: 0;
- right: 0;
-
- content: '';
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.75); /* 원하는 색상과 투명도를 설정 */
- }
- `}
- `,
-
- TrackImage: styled.img`
- width: 100%;
- height: 100%;
- transform: translate(50, 50);
- object-fit: cover;
- margin: auto;
- `,
-
- TrackInfoWrapper: styled.div`
- display: flex;
- flex-direction: column;
- `,
-
- TrackCategoryWrapper: styled.div`
- display: flex;
- align-items: center;
-
- width: 100%;
-
- margin-bottom: 1rem;
- `,
-
- TrackCategory: styled.p`
- color: ${({ theme }) => theme.colors.sub2};
- ${({ theme }) => theme.fonts.pretendard_text20};
- `,
-
- TrackCategoryCount: styled.div`
- display: flex;
- justify-content: center;
- align-items: center;
-
- width: 2rem;
- height: 2rem;
-
- margin-left: 0.5rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.pretendard_text12};
-
- background-color: ${({ theme }) => theme.colors.sub2};
- border-radius: 50%;
- `,
-
- UserName: styled.p`
- margin-bottom: 2.8rem;
-
- color: ${({ theme }) => theme.colors.white};
- ${({ theme }) => theme.fonts.pretendard_text22};
-
- :hover {
- color: ${({ theme }) => theme.colors.sub2};
- }
- `,
-
- TrackKeyword: styled.p`
- margin-bottom: 1rem;
-
- color: ${({ theme }) => theme.colors.gray3};
- ${({ theme }) => theme.fonts.pretendard_text20};
- `,
-
- PlayIcon: styled(PlayIc)`
- position: absolute;
-
- width: 3.4rem;
-
- cursor: pointer;
- `,
-
- PauseIcon: styled(PauseIc)`
- position: absolute;
-
- width: 3rem;
-
- cursor: pointer;
- `,
-};
diff --git a/apps/desktop/src/@components/main/recentVocalList.tsx b/apps/desktop/src/@components/main/recentVocalList.tsx
deleted file mode 100644
index 6660c3333..000000000
--- a/apps/desktop/src/@components/main/recentVocalList.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import styled from 'styled-components';
-import RecentVocalItem from './recentVocalItem';
-import { useGetRecentVocals } from '../../hooks/queries/vocals';
-import { useState } from 'react';
-import { FilteredVocalType } from '../../type/vocals';
-
-export default function RecentVocalList() {
- const { recentVocalInfo } = useGetRecentVocals(6);
- const [playingTrack, setPLayingTrack] = useState(null);
-
- function selectTrack(userId: FilteredVocalType['userId']) {
- setPLayingTrack(userId);
- }
-
- if (recentVocalInfo === undefined) return null;
-
- return (
-
- {recentVocalInfo?.map((vocalInfo) => (
-
- ))}
-
- );
-}
-
-const Styled = {
- Container: styled.ul`
- display: flex;
- justify-content: space-between;
-
- flex-wrap: wrap;
- gap: 10rem 0;
- `,
-};
diff --git a/apps/desktop/src/@components/mobileLanding/engLinkBox.tsx b/apps/desktop/src/@components/mobileLanding/engLinkBox.tsx
deleted file mode 100644
index 2938a46b3..000000000
--- a/apps/desktop/src/@components/mobileLanding/engLinkBox.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import styled from "styled-components";
-
-export default function EngLinkBox() {
- return (
-
- Email
-
- contact.track1@gmail.com
-
- Instagram
-
- @track1.kr
-
- Youtube
-
- www.youtube.com/@Track-1.official
-
- Our website
-
- www.track1.site
-
-
- ©Track1. All rights reserved.
-
- );
-}
-
-const LinkBoxContainer = styled.section`
- display: flex;
- flex-direction: column;
-
- justify-content: flex-start;
-
- padding-left: 2rem;
-`;
-
-const Name = styled.h1`
- color: var(--gray3, #535559);
- font-family: Pretendard;
- font-size: 1.5rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- margin-top: 2rem;
-`;
-
-const Content = styled.p<{ isEmail: boolean }>`
- color: var(--gray1, #d9d9d9);
- font-family: Pretendard;
- font-size: 2rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%; /* 3.2rem */
- text-decoration-line: ${({ isEmail }) => !isEmail && "underline"};
-`;
-
-const CopyRight = styled.p`
- color: var(--gray4, #313338);
- font-family: Pretendard;
- font-size: 1.4rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- margin: 2.6rem 0 6rem 0;
-`;
diff --git a/apps/desktop/src/@components/mobileLanding/englishVersion.tsx b/apps/desktop/src/@components/mobileLanding/englishVersion.tsx
deleted file mode 100644
index 3496a917e..000000000
--- a/apps/desktop/src/@components/mobileLanding/englishVersion.tsx
+++ /dev/null
@@ -1,242 +0,0 @@
-import { useEffect, useRef, useState } from "react";
-import styled, { keyframes } from "styled-components";
-import { MobileHeadBackgroudnIc } from "../../assets";
-
-export default function EnglishVersion() {
- const [pageY, setPageY] = useState(0);
- const documentRef = useRef(document);
-
- useEffect(() => {
- documentRef.current.addEventListener("scroll", handleScroll);
- return () => documentRef.current.removeEventListener("scroll", handleScroll);
- }, [pageY]);
-
- function handleScroll() {
- const { pageYOffset } = window;
- setPageY(pageYOffset);
- }
-
- function handleShareOtherWays() {
- if (navigator.share) {
- navigator.share({
- title: "Track-1",
- text: "Access via PC or tablet.",
- url: "https://www.track1.site",
- });
- } else {
- alert("공유하기가 지원되지 않는 환경 입니다.");
- }
- }
-
- return (
-
-
-
-
- We have
- tons of vocals.
-
- Find the best vocals that fit your song.
-
-
-
- You can meet
-
- them via PC
-
-
- Save the PC link
-
-
-
-
-
- Save the PC link
-
- Access via PC or tablet.
-
-
-
- {/*
- */}
-
-
-
- );
-}
-
-const GotoPCBottomSection = styled.section`
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-top: 170rem;
-
- text-align: center;
-`;
-
-const Show = keyframes`
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
-`;
-
-const Video = styled.video<{ pageY: number }>`
- width: 35.2rem;
- height: 19.8rem;
- background: #d9d9d9;
-
- margin-left: 2rem;
- margin-top: 4rem;
-
- display: ${({ pageY }) => (pageY >= 500 ? "block" : "none")};
-
- animation: ${Show} 2s ease-out;
-`;
-
-const PcSaveButton = styled.button<{ pageY: number }>`
- font-family: Pretendard;
- font-size: 1.8rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- margin-top: 2rem;
- width: 21.5rem;
- height: 4.8rem;
- border-radius: 2.4rem;
-
- color: ${({ theme }) => theme.colors.white};
-
- background-color: ${({ theme }) => theme.colors.main};
-
- display: ${({ pageY }) => (pageY >= 500 ? "block" : "none")};
- animation: ${Show} 2s ease-out;
-`;
-
-const SmallPcComment = styled.p`
- font-family: Pretendard;
- font-size: 1.5rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- display: block;
-
- margin-top: 1.5rem;
-`;
-
-const FirstTitle = styled.h1`
- font-family: Pretendard;
- font-size: 5rem;
-
- font-style: normal;
- font-weight: 600;
- line-height: 120%;
-
- width: 33.6rem;
-
- display: flex;
- flex-wrap: wrap;
-`;
-
-const FontLarger = keyframes`
- 0% {
- font-size:1.5rem;
- margin-top:7rem;
- }
- 100% {
- font-size:5rem;
- margin-top:35rem;
- }
-`;
-
-const SubTitle = styled.p<{ pageY: number }>`
- font-family: Pretendard;
-
- /* animation: ${({ pageY }) => pageY > 30 && FontLarger} 2s ease-out; */
-
- margin-top: ${({ pageY }) => (0.07 * pageY >= 35 ? 35 : 0.07 * pageY <= 7 ? 7 : 0.07 * pageY)}rem;
-
- font-size: ${({ pageY }) => (0.03 * pageY >= 5 ? 5 : 0.03 * pageY <= 3.3 ? 3.3 : 0.03 * pageY)}rem;
- font-style: normal;
- font-weight: 600;
- line-height: 120%;
- color: ${({ pageY, theme }) => (pageY <= 30 ? theme.colors.gray3 : theme.colors.white)};
-
- width: 100%;
- text-align: center;
-
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
-`;
-
-const FrontContents = styled.div`
- position: absolute;
- width: 39.3rem;
-
- margin-top: 12rem;
-`;
-
-const GotoPCSection = styled.section`
- display: flex;
- flex-direction: column;
- align-items: center;
-`;
-
-const TextField = styled.div`
- padding-left: 2rem;
-`;
-
-const KoreaVersionSection = styled.section`
- color: ${({ theme }) => theme.colors.white};
-`;
-
-const MobileHeadBackgroudnIcon = styled(MobileHeadBackgroudnIc)`
- width: 39.3rem;
- height: 29.1rem;
- margin-top: 12rem;
- /* 애니메이션 필요 */
-`;
-
-const MobileEngBackgroundGradationIcon1 = styled.img<{ pageY: number }>`
- margin-top: ${({ pageY }) => (0.07 * pageY + 10 >= 47 ? 47 : 0.07 * pageY <= 1.5 ? 10 : 0.07 * pageY + 10)}rem;
- width: 39.3rem;
- height: 137rem;
-`;
-
-const MobileEngBackgroundGradationIcon2 = styled.img`
- width: 39.3rem;
- height: 104.7rem;
-`;
-
-const Sub = styled.p`
- font-family: Pretendard;
- font-size: 1.7rem;
- font-style: normal;
- font-weight: 500;
- line-height: 120%;
-
- margin-top: 2rem;
- margin-bottom: 20rem;
-`;
diff --git a/apps/desktop/src/@components/mobileLanding/index.tsx b/apps/desktop/src/@components/mobileLanding/index.tsx
deleted file mode 100644
index 2ef124637..000000000
--- a/apps/desktop/src/@components/mobileLanding/index.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { useState } from "react";
-import styled from "styled-components";
-import EngLinkBox from "./engLinkBox";
-import EnglishVersion from "./englishVersion";
-import KorLinkBox from "./korLinkBox";
-import KoreaVersion from "./koreaVersion";
-import MobileHeader from "./mobileHeader";
-
-export default function MobileLanding() {
- const [language, setLanguage] = useState("Kor");
-
- return (
-
-
-
- {language === "Kor" ? : }
- {language === "Kor" ? : }
-
-
- );
-}
-
-const MobileLandingContainer = styled.div`
- width: 100%;
-
- display: flex;
- justify-content: center;
-
- /* overflow: scroll; */
- scroll-behavior: smooth;
-`;
-
-const MobileLandingSection = styled.section`
- width: 39.3rem;
-
- /* border: 1px solid white; */
-`;
diff --git a/apps/desktop/src/@components/mobileLanding/korLinkBox.tsx b/apps/desktop/src/@components/mobileLanding/korLinkBox.tsx
deleted file mode 100644
index 68f93caec..000000000
--- a/apps/desktop/src/@components/mobileLanding/korLinkBox.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import styled from "styled-components";
-
-export default function KorLinkBox() {
- return (
-
- Email
-
- contact.track1@gmail.com
-
- Instagram
-
- @track1.kr
-
- Youtube
-
- www.youtube.com/@Track-1.official
-
- Our website
-
- www.track1.site
-
-
- ©Track1. All rights reserved.
-
- );
-}
-
-const LinkBoxContainer = styled.section`
- display: flex;
- flex-direction: column;
-
- justify-content: flex-start;
-
- padding-left: 2rem;
- margin-bottom: 10rem;
-`;
-
-const Name = styled.h1`
- color: var(--gray3, #535559);
- font-family: Pretendard;
- font-size: 1.5rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- margin-top: 2rem;
-`;
-
-const Content = styled.p<{ isEmail: boolean }>`
- color: var(--gray1, #d9d9d9);
- font-family: Pretendard;
- font-size: 2rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%; /* 3.2rem */
- text-decoration-line: ${({ isEmail }) => !isEmail && "underline"};
-`;
-
-const CopyRight = styled.p`
- color: var(--gray4, #313338);
- font-family: Pretendard;
- font-size: 1.4rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- margin: 2.6rem 0 6rem 0;
-`;
diff --git a/apps/desktop/src/@components/mobileLanding/koreaVersion.tsx b/apps/desktop/src/@components/mobileLanding/koreaVersion.tsx
deleted file mode 100644
index 4683469b5..000000000
--- a/apps/desktop/src/@components/mobileLanding/koreaVersion.tsx
+++ /dev/null
@@ -1,280 +0,0 @@
-import { useEffect, useRef, useState } from "react";
-import styled, { keyframes } from "styled-components";
-import { MobileHeadBackgroudnIc } from "../../assets";
-// kakao 기능 동작을 위해 넣어준다.
-const { Kakao } = window;
-
-export default function KoreaVersion() {
- const [pageY, setPageY] = useState(0);
- const documentRef = useRef(document);
- const [isKakao, setIsKakao] = useState(false);
- const [isKakao2, setIsKakao2] = useState(false);
-
- useEffect(() => {
- documentRef.current.addEventListener("scroll", handleScroll);
- return () => documentRef.current.removeEventListener("scroll", handleScroll);
- }, [pageY]);
-
- function handleScroll() {
- const { pageYOffset } = window;
- setPageY(pageYOffset);
- }
-
- // 재랜더링시에 실행되게 해준다.
- useEffect(() => {
- // init 해주기 전에 clean up 을 해준다.
- Kakao.cleanup();
- // 자신의 js 키를 넣어준다.
-
- Kakao.init("d2ec963420b55d4c903b1f90d5284d36");
- // 잘 적용되면 true 를 뱉는다.
- }, []);
-
- function handleKakaoShare() {
- setIsKakao(true);
- if (!Kakao.isInitialized()) {
- // Kakao.init(process.env.REACT_APP_KAKAO_JS_KEY);
- Kakao.init("d2ec963420b55d4c903b1f90d5284d36");
- }
-
- // Kakao.Share.createCustomButton({
- Kakao.Share.sendCustom({
- // container: "#kakao-link-btn",
- templateId: 98550,
- templateArgs: {
- title: "Track-1",
- description: "Discover Your Limitless Track",
- },
- });
- }
-
- function handleKakaoShare2() {
- setIsKakao2(true);
- if (!Kakao.isInitialized()) {
- // Kakao.init(process.env.REACT_APP_KAKAO_JS_KEY);
- Kakao.init("d2ec963420b55d4c903b1f90d5284d36");
- }
-
- // Kakao.Share.createCustomButton({
- Kakao.Share.sendCustom({
- // container: "#kakao-link-btn2",
- templateId: 98550,
- templateArgs: {
- title: "Track-1",
- description: "Discover Your Limitless Track",
- },
- });
- }
-
- return (
-
-
-
-
- 여기 보컬
-
진짜 많아요.
-
- 내 노래에 맞는 보컬, 직접 들어보고 구하세요!
-
-
-
- PC로 접속하면
-
- 만날 수 있어요
-
-
- PC 링크 저장해두기
-
-
-
-
-
- PC 링크 저장해두기
-
- PC나 태블릿으로 접속하세요
-
-
-
- {/* */}
- {/* */}
-
-
-
- );
-}
-
-const GotoPCBottomSection = styled.section`
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-top: 170rem;
-
- text-align: center;
-`;
-
-const Show = keyframes`
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
-`;
-
-const Video = styled.video<{ pageY: number }>`
- width: 35.2rem;
- height: 19.8rem;
- background: #d9d9d9;
-
- margin-left: 2rem;
- margin-top: 4rem;
-
- display: ${({ pageY }) => (pageY >= 500 ? "block" : "none")};
-
- animation: ${Show} 2s ease-out;
-`;
-
-const PcSaveButton = styled.button<{ pageY: number }>`
- font-family: Pretendard;
- font-size: 1.8rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- margin-top: 2rem;
- width: 21.5rem;
- height: 4.8rem;
- border-radius: 2.4rem;
-
- color: ${({ theme }) => theme.colors.white};
-
- background-color: ${({ theme }) => theme.colors.main};
-
- display: ${({ pageY }) => (pageY >= 500 ? "block" : "none")};
- animation: ${Show} 2s ease-out;
-`;
-
-const SmallPcComment = styled.p`
- font-family: Pretendard;
- font-size: 1.5rem;
- font-style: normal;
- font-weight: 500;
- line-height: 160%;
-
- display: block;
-
- margin-top: 1.5rem;
-`;
-
-const FirstTitle = styled.h1`
- font-family: Pretendard;
- font-size: 5rem;
-
- font-style: normal;
- font-weight: 600;
- line-height: 120%;
-
- width: 24.9rem;
-
- display: flex;
- flex-wrap: wrap;
-`;
-
-const FontLarger = keyframes`
- 0% {
- font-size:1.5rem;
- margin-top:7rem;
- }
- 100% {
- font-size:5rem;
- margin-top:35rem;
- }
-`;
-
-const SubTitle = styled.p<{ pageY: number }>`
- font-family: Pretendard;
-
- /* animation: ${({ pageY }) => pageY > 30 && FontLarger} 2s ease-out; */
-
- margin-top: ${({ pageY }) => (0.07 * pageY >= 35 ? 35 : 0.07 * pageY <= 7 ? 7 : 0.07 * pageY)}rem;
-
- font-size: ${({ pageY }) => (0.03 * pageY >= 5 ? 5 : 0.03 * pageY <= 3.3 ? 3.3 : 0.03 * pageY)}rem;
- font-style: normal;
- font-weight: 600;
- line-height: 120%;
- color: ${({ pageY, theme }) => (pageY <= 30 ? theme.colors.gray3 : theme.colors.white)};
-
- width: 100%;
- text-align: center;
-
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
-`;
-
-const FrontContents = styled.div`
- position: absolute;
- width: 39.3rem;
-
- margin-top: 12rem;
-`;
-
-const GotoPCSection = styled.section`
- display: flex;
- flex-direction: column;
- align-items: center;
-`;
-
-const TextField = styled.div`
- padding-left: 2rem;
-`;
-
-const KoreaVersionSection = styled.section`
- color: ${({ theme }) => theme.colors.white};
-`;
-
-const MobileHeadBackgroudnIcon = styled(MobileHeadBackgroudnIc)`
- width: 39.3rem;
- height: 29.1rem;
- margin-top: 12rem;
- /* 애니메이션 필요 */
-`;
-
-const MobileBackgroundGradationIcon1 = styled.img<{ pageY: number }>`
- margin-top: ${({ pageY }) => (0.07 * pageY + 10 >= 47 ? 47 : 0.07 * pageY <= 1.5 ? 10 : 0.07 * pageY + 10)}rem;
- width: 39.3rem;
- height: 137rem;
-`;
-
-const MobileBackgroundGradationIcon2 = styled.img`
- width: 39.3rem;
- height: 104.7rem;
-`;
-
-const Sub = styled.p`
- font-family: Pretendard;
- font-size: 1.7rem;
- font-style: normal;
- font-weight: 500;
- line-height: 120%;
-
- margin-top: 2rem;
- margin-bottom: 20rem;
-`;
diff --git a/apps/desktop/src/@components/mobileLanding/mobileHeader.tsx b/apps/desktop/src/@components/mobileLanding/mobileHeader.tsx
deleted file mode 100644
index bcbe5c176..000000000
--- a/apps/desktop/src/@components/mobileLanding/mobileHeader.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import { Dispatch, SetStateAction } from "react";
-import styled from "styled-components";
-import { MobileTrack1Ic } from "../../assets";
-
-interface HeaderProp {
- language: string;
- setLanguage: Dispatch>;
-}
-
-export default function MobileHeader(props: HeaderProp) {
- const { language, setLanguage } = props;
-
- function handleChangLanguage(language: string) {
- setLanguage(language);
- }
-
- return (
-
-
-
- handleChangLanguage("Kor")}>
- KOR
-
- handleChangLanguage("Eng")}>
- ENG
-
-
-
- );
-}
-
-const MobileHeaderSection = styled.header`
- position: absolute;
- display: flex;
- justify-content: space-between;
-
- padding: 4.7rem 2.07rem 6rem 2rem;
- width: 39.3rem;
-`;
-
-const MobileTrack1Icon = styled(MobileTrack1Ic)`
- width: 15.2rem;
- height: 1.44rem;
-`;
-
-const LangauageSelect = styled.ul<{ language: string }>`
- display: flex;
- justify-content: space-between;
-
- width: 7.2rem;
-
- font-family: "Pretendard";
- font-size: 1.4rem;
- font-style: normal;
- font-weight: 500;
- line-height: normal;
-
- .Kor {
- color: ${({ theme, language }) => (language === "Kor" ? "white" : theme.colors.gray3)};
- }
-
- .Eng {
- color: ${({ theme, language }) => (language === "Eng" ? "white" : theme.colors.gray3)};
- }
-`;
diff --git a/apps/desktop/src/@components/portfolio/musicInformation.tsx b/apps/desktop/src/@components/portfolio/musicInformation.tsx
index 43ce0dc8e..b62f6dd21 100644
--- a/apps/desktop/src/@components/portfolio/musicInformation.tsx
+++ b/apps/desktop/src/@components/portfolio/musicInformation.tsx
@@ -1,6 +1,6 @@
-import styled from "styled-components";
-import { UserPortfolioType } from "../../type/profile";
-import HashTag from "../profile/hashtag";
+import styled from 'styled-components';
+import HashTag from '../profile/hashtag';
+import { UserPortfolioType } from '../../type/profile';
interface MusicInformationProps {
portfolio: UserPortfolioType;
@@ -51,12 +51,6 @@ const InformContent = styled.p`
margin-bottom: 2.4rem;
`;
-const InformTag = styled.div<{ textLength: number }>`
- display: flex;
-
- padding: 0 1.5rem;
-`;
-
const InformTagWrapper = styled.div`
display: flex;
flex-wrap: wrap;
diff --git a/apps/desktop/src/@components/portfolio/portfolioUpdateModal.tsx b/apps/desktop/src/@components/portfolio/portfolioUpdateModal.tsx
index 749ff83ab..267d6c14d 100644
--- a/apps/desktop/src/@components/portfolio/portfolioUpdateModal.tsx
+++ b/apps/desktop/src/@components/portfolio/portfolioUpdateModal.tsx
@@ -1,10 +1,8 @@
-import { useContext, useState } from "react";
-import { useLocation, useNavigate } from "react-router-dom";
-import styled from "styled-components";
-import { PencilUpdateIc, SetIsTitleIc, TrashDeleteIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import useModal from "../../hooks/common/useModal";
-import useUpdateModal from "../../hooks/common/useUpdateModal";
+import styled from 'styled-components';
+import useModal from '../../hooks/common/useModal';
+import useUpdateModal from '../../hooks/common/useUpdateModal';
+import { useLocation, useNavigate } from 'react-router-dom';
+import { PencilUpdateIc, SetIsTitleIc, TrashDeleteIc } from '../../assets';
import {
deleteFirstProducer,
deleteFirstVocal,
@@ -12,15 +10,16 @@ import {
useDeleteVocalPortfolio,
useEditProducerTitle,
useEditVocalTitle,
-} from "../../hooks/queries/mypage";
-import { useDeleteTrack } from "../../hooks/queries/tracks";
-import { ProducerVocalSearchingType, UserPortfolioType } from "../../type/profile";
+} from '../../hooks/queries/mypage';
+import { useDeleteTrack } from '../../hooks/queries/tracks';
+import { ProducerVocalSearchingType, UserPortfolioType } from '../../type/profile';
+import { PlayUseContext } from '../../context/playerContext';
interface PortfolioUpdateModalProp {
isTitle: boolean;
- nowTitleId: number;
- nowTitleNextId: number;
- portfolioId: number;
+ nowTitleId: string;
+ nowTitleNextId: string;
+ portfolioId: string;
dataState: string;
clickedPortfolio?: UserPortfolioType;
clickedProducerVocalSearching?: ProducerVocalSearchingType;
@@ -40,18 +39,18 @@ export default function PortfolioUpdateModal(props: PortfolioUpdateModalProp) {
const { deleteVocalPortfolio } = useDeleteVocalPortfolio();
const { deleteProducerPortfolio } = useDeleteProducerPortfolio();
const { deleteTrack } = useDeleteTrack();
- const [isDelete, setIsDelete] = useState(false);
const { editVocalTitle } = useEditVocalTitle();
const { editProducerTitle } = useEditProducerTitle();
const { unShowModal } = useModal();
+ const { quitAudioForMovePage } = PlayUseContext({});
const { modalRef, unShowModal: unShowUpdateModal } = useUpdateModal();
- const { quitAudioForMovePage } = useContext(PlayerContext);
const prevURL = useLocation().pathname;
function handleMoveToEditPage() {
quitAudioForMovePage();
+
switch (dataState) {
- case "producer portfolio":
+ case 'producer portfolio':
navigate(`/portfolio-edit/producer/${portfolioId}`, {
state: {
prevURL: prevURL,
@@ -59,7 +58,7 @@ export default function PortfolioUpdateModal(props: PortfolioUpdateModalProp) {
},
});
break;
- case "producer vocal searching":
+ case 'producer vocal searching':
navigate(`/vocal-searching-edit/producer/${portfolioId}`, {
state: {
prevURL: prevURL,
@@ -67,7 +66,7 @@ export default function PortfolioUpdateModal(props: PortfolioUpdateModalProp) {
},
});
break;
- case "vocal portfolio":
+ case 'vocal portfolio':
navigate(`/portfolio-edit/vocal/${portfolioId}`, {
state: {
prevURL: prevURL,
@@ -82,26 +81,24 @@ export default function PortfolioUpdateModal(props: PortfolioUpdateModalProp) {
async function handleAskToDeleteTrack() {
quitAudioForMovePage();
- if (window.confirm("Are you sure you want to delete the post?\n게시글을 삭제하시겠습니까?")) {
- if (dataState === "producer vocal searching") {
+ if (window.confirm('Are you sure you want to delete the post?\n게시글을 삭제하시겠습니까?')) {
+ if (dataState === 'producer vocal searching') {
deleteTrack(portfolioId);
}
- //타이틀곡을 삭제하려는 경우
if (nowTitleId === portfolioId) {
- if (dataState === "vocal portfolio") {
+ if (dataState === 'vocal portfolio') {
deleteFirstVocal({ bef: nowTitleId, aft: nowTitleNextId }, portfolioId);
} else {
deleteFirstProducer({ bef: nowTitleId, aft: nowTitleNextId }, portfolioId);
}
- }
- // 타이틀 곡 아닌 곡을 삭제하려는 경우
- else {
- if (dataState === "vocal portfolio") {
+ } else {
+ if (dataState === 'vocal portfolio') {
deleteVocalPortfolio(portfolioId);
} else {
deleteProducerPortfolio(portfolioId);
}
}
+
unShowModal();
unShowUpdateModal();
}
@@ -109,12 +106,13 @@ export default function PortfolioUpdateModal(props: PortfolioUpdateModalProp) {
function handleChangeTitle() {
quitAudioForMovePage();
- if (dataState === "vocal portfolio") {
+
+ if (dataState === 'vocal portfolio') {
editVocalTitle({
bef: nowTitleId,
aft: portfolioId,
});
- } else if (dataState === "producer portfolio") {
+ } else if (dataState === 'producer portfolio') {
editProducerTitle({ bef: nowTitleId, aft: portfolioId });
}
}
@@ -126,11 +124,11 @@ export default function PortfolioUpdateModal(props: PortfolioUpdateModalProp) {
수정하기
-
+
삭제하기
- {dataState !== "producer vocal searching" && !isTitle && (
+ {dataState !== 'producer vocal searching' && !isTitle && (
타이틀 설정
@@ -179,7 +177,7 @@ const ModalBox = styled.div<{ underline: boolean }>`
width: 20.1rem;
height: 5.6rem;
padding: 1.1rem 1.9rem;
- border-bottom: 0.1rem solid ${({ underline, theme }) => (underline ? theme.colors.gray3 : "transparent")};
+ border-bottom: 0.1rem solid ${({ underline, theme }) => (underline ? theme.colors.gray3 : 'transparent')};
cursor: pointer;
`;
diff --git a/apps/desktop/src/@components/portfolio/producerPortfolio.tsx b/apps/desktop/src/@components/portfolio/producerPortfolio.tsx
index ac78dc65e..27cfbcc0f 100644
--- a/apps/desktop/src/@components/portfolio/producerPortfolio.tsx
+++ b/apps/desktop/src/@components/portfolio/producerPortfolio.tsx
@@ -1,50 +1,46 @@
-import { useContext, useEffect } from "react";
-import { useParams } from "react-router-dom";
-import { useRecoilState } from "recoil";
-import styled from "styled-components";
-import { PortfolioPauseIc, PortfolioPlayIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import usePlaySelectedTrack from "../../hooks/common/usePlaySelectedTrack";
-import { useGetProducerProfile } from "../../hooks/queries/mypage";
-import { clickedProfileId, hoveredProfileId } from "../../recoil/common/profile";
-import { UserPortfolioType } from "../../type/profile";
+import styled from 'styled-components';
+import usePlaySelectedTrack from '../../hooks/common/usePlaySelectedTrack';
+import { useEffect } from 'react';
+import { useParams } from 'react-router-dom';
+import { PortfolioPauseIc, PortfolioPlayIc } from '../../assets';
+import { useGetProducerProfile } from '../../hooks/queries/mypage';
+import { UserPortfolioType } from '../../type/profile';
+import { PlayUseContext } from '../../context/playerContext';
interface ProducerBigPortfolioProps {
producerPortfolios: UserPortfolioType;
isFirst: boolean;
- playingTrack: UserPortfolioType["portfolioId"] | null;
- selectTrack: (trackId: UserPortfolioType["portfolioId"]) => void;
+ playingTrack: UserPortfolioType['portfolioId'] | null;
+ selectTrack: (trackId: UserPortfolioType['portfolioId']) => void;
}
export default function ProducerPortfolio(props: ProducerBigPortfolioProps) {
const { producerPortfolios, isFirst, playingTrack, selectTrack } = props;
- const { contextPlaying, getPlayerInfo, showPlayer, ...playerContext } = useContext(PlayerContext);
+ const { contextPlaying, getPlayerInfo, showPlayer, ...playerContext } = PlayUseContext({});
const { innerPlaying, isHovered, playAudioItem, stopAudioItem, hoverTrack, unhoverTrack } = usePlaySelectedTrack(
playerContext,
producerPortfolios.portfolioAudioFile,
producerPortfolios.portfolioId,
selectTrack,
+ playingTrack
);
+ const { id } = useParams();
+ const { data: producerProfile } = useGetProducerProfile(Number(id));
const isSelected = playingTrack === producerPortfolios.portfolioId;
const isBig = isFirst || (isSelected && showPlayer);
- const { id } = useParams();
- const { producerProfile } = useGetProducerProfile(Number(id));
- const [hoverId, setHoverId] = useRecoilState(hoveredProfileId);
- const [clickId, setClickId] = useRecoilState(clickedProfileId);
function handlePlaying(isPause: boolean) {
- setClickId(producerPortfolios.portfolioId);
- isPause ? stopAudioItem() : playAudioItem();
+ if (playingTrack === null) return;
+
+ isPause ? stopAudioItem() : playAudioItem(playingTrack);
}
function handleHoverTrack() {
hoverTrack();
- setHoverId(producerPortfolios.portfolioId);
}
function handleUnhoverTrack() {
unhoverTrack();
- setHoverId(-1);
}
useEffect(() => {
@@ -155,7 +151,7 @@ const Title = styled.h1<{ isLight: boolean }>`
white-space: normal;
color: ${({ theme }) => theme.colors.gray2};
- display: ${({ isLight }) => (isLight ? "none" : "flex")};
+ display: ${({ isLight }) => (isLight ? 'none' : 'flex')};
${({ theme }) => theme.fonts.id}
diff --git a/apps/desktop/src/@components/portfolio/vocalPortfolio.tsx b/apps/desktop/src/@components/portfolio/vocalPortfolio.tsx
index b9e37c6ef..e14c07f0f 100644
--- a/apps/desktop/src/@components/portfolio/vocalPortfolio.tsx
+++ b/apps/desktop/src/@components/portfolio/vocalPortfolio.tsx
@@ -1,50 +1,46 @@
-import { useContext, useEffect } from "react";
-import { useParams } from "react-router-dom";
-import { useRecoilState } from "recoil";
-import styled from "styled-components";
-import { PortfolioPauseIc, PortfolioPlayIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import usePlaySelectedTrack from "../../hooks/common/usePlaySelectedTrack";
-import { useGetVocalProfile } from "../../hooks/queries/mypage";
-import { clickedProfileId, hoveredProfileId } from "../../recoil/common/profile";
-import { UserPortfolioType } from "../../type/profile";
+import styled from 'styled-components';
+import usePlaySelectedTrack from '../../hooks/common/usePlaySelectedTrack';
+import { useEffect } from 'react';
+import { useParams } from 'react-router-dom';
+import { PortfolioPauseIc, PortfolioPlayIc } from '../../assets';
+import { useGetVocalProfile } from '../../hooks/queries/mypage';
+import { UserPortfolioType } from '../../type/profile';
+import { PlayUseContext } from '../../context/playerContext';
interface VocalBigPortfolioProps {
vocalPortfolios: UserPortfolioType;
isFirst: boolean;
- playingTrack: UserPortfolioType["portfolioId"] | null;
- selectTrack: (trackId: UserPortfolioType["portfolioId"]) => void;
+ playingTrack: UserPortfolioType['portfolioId'] | null;
+ selectTrack: (trackId: UserPortfolioType['portfolioId']) => void;
}
export default function VocalPortfolio(props: VocalBigPortfolioProps) {
const { vocalPortfolios, isFirst, playingTrack, selectTrack } = props;
- const { contextPlaying, getPlayerInfo, showPlayer, ...playerContext } = useContext(PlayerContext);
+ const { contextPlaying, getPlayerInfo, showPlayer, ...playerContext } = PlayUseContext({});
const { innerPlaying, isHovered, playAudioItem, stopAudioItem, hoverTrack, unhoverTrack } = usePlaySelectedTrack(
playerContext,
vocalPortfolios.portfolioAudioFile,
vocalPortfolios.portfolioId,
selectTrack,
+ playingTrack
);
- const isSelected = playingTrack === vocalPortfolios.portfolioId;
- const isBig = isFirst || (isSelected && showPlayer);
const { id } = useParams();
const { vocalProfile } = useGetVocalProfile(Number(id));
- const [hoverId, setHoverId] = useRecoilState(hoveredProfileId);
- const [clickId, setClickId] = useRecoilState(clickedProfileId);
+ const isSelected = playingTrack === vocalPortfolios.portfolioId;
+ const isBig = isFirst || (isSelected && showPlayer);
function handlePlaying(isPause: boolean) {
- setClickId(vocalPortfolios.portfolioId);
- isPause ? stopAudioItem() : playAudioItem();
+ if (playingTrack === null) return;
+
+ isPause ? stopAudioItem() : playAudioItem(playingTrack);
}
function handleHoverTrack() {
hoverTrack();
- setHoverId(vocalPortfolios.portfolioId);
}
function handleUnhoverTrack() {
unhoverTrack();
- setHoverId(-1);
}
useEffect(() => {
@@ -158,7 +154,7 @@ const Title = styled.h1<{ isLight: boolean }>`
white-space: normal;
color: ${({ theme }) => theme.colors.gray2};
- display: ${({ isLight }) => (isLight ? "none" : "flex")};
+ display: ${({ isLight }) => (isLight ? 'none' : 'flex')};
${({ theme }) => theme.fonts.id}
diff --git a/apps/desktop/src/@components/producerProfile/ProducerVocalSearchingPortfolio.tsx b/apps/desktop/src/@components/producerProfile/ProducerVocalSearchingPortfolio.tsx
index ea2f26f3d..4783c489a 100644
--- a/apps/desktop/src/@components/producerProfile/ProducerVocalSearchingPortfolio.tsx
+++ b/apps/desktop/src/@components/producerProfile/ProducerVocalSearchingPortfolio.tsx
@@ -1,49 +1,45 @@
-import { useContext, useEffect } from "react";
-import { useParams } from "react-router-dom";
-import { useRecoilState } from "recoil";
-import styled from "styled-components";
-import { PortfolioPauseIc, PortfolioPlayIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import usePlaySelectedTrack from "../../hooks/common/usePlaySelectedTrack";
-import { useGetProducerProfile } from "../../hooks/queries/mypage";
-import { clickedProfileId, hoveredProfileId } from "../../recoil/common/profile";
-import { ProducerVocalSearchingType, UserPortfolioType } from "../../type/profile";
+import styled from 'styled-components';
+import usePlaySelectedTrack from '../../hooks/common/usePlaySelectedTrack';
+import { useEffect } from 'react';
+import { useParams } from 'react-router-dom';
+import { PortfolioPauseIc, PortfolioPlayIc } from '../../assets';
+import { useGetProducerProfile } from '../../hooks/queries/mypage';
+import { ProducerVocalSearchingType, UserPortfolioType } from '../../type/profile';
+import { PlayUseContext } from '../../context/playerContext';
interface ProducerVocalSearchingPortfolioProps {
producerVocalSearchings: ProducerVocalSearchingType;
- playingTrack: UserPortfolioType["portfolioId"] | null;
- selectTrack: (trackId: UserPortfolioType["portfolioId"]) => void;
+ playingTrack: UserPortfolioType['portfolioId'] | null;
+ selectTrack: (trackId: UserPortfolioType['portfolioId']) => void;
}
export default function ProducerVocalSearchingPortfolio(props: ProducerVocalSearchingPortfolioProps) {
const { producerVocalSearchings, playingTrack, selectTrack } = props;
- const { contextPlaying, getPlayerInfo, showPlayer, ...playerContext } = useContext(PlayerContext);
+ const { contextPlaying, getPlayerInfo, showPlayer, ...playerContext } = PlayUseContext({});
const { innerPlaying, isHovered, playAudioItem, stopAudioItem, hoverTrack, unhoverTrack } = usePlaySelectedTrack(
playerContext,
producerVocalSearchings.trackAudioFile,
producerVocalSearchings.trackId,
selectTrack,
+ playingTrack
);
- const isSelected = playingTrack === producerVocalSearchings.trackId;
const { id } = useParams();
- const { producerProfile } = useGetProducerProfile(Number(id));
- const [hoverId, setHoverId] = useRecoilState(hoveredProfileId);
- const [clickId, setClickId] = useRecoilState(clickedProfileId);
+ const { data: producerProfile } = useGetProducerProfile(Number(id));
+ const isSelected = playingTrack === producerVocalSearchings.trackId;
const isBig = isSelected && showPlayer;
function handlePlaying(isPause: boolean) {
- setClickId(producerVocalSearchings.trackId);
- isPause ? stopAudioItem() : playAudioItem();
+ if (playingTrack === null) return;
+
+ isPause ? stopAudioItem() : playAudioItem(playingTrack);
}
function handleHoverTrack() {
hoverTrack();
- setHoverId(producerVocalSearchings.trackId);
}
function handleUnhoverTrack() {
unhoverTrack();
- setHoverId(-1);
}
useEffect(() => {
@@ -155,7 +151,7 @@ const Title = styled.h1<{ isLight: boolean }>`
white-space: normal;
color: ${({ theme }) => theme.colors.gray2};
- display: ${({ isLight }) => (isLight ? "none" : "flex")};
+ display: ${({ isLight }) => (isLight ? 'none' : 'flex')};
${({ theme }) => theme.fonts.id}
diff --git a/apps/desktop/src/@components/producerProfile/index.tsx b/apps/desktop/src/@components/producerProfile/index.tsx
index 82487482f..84f63ac18 100644
--- a/apps/desktop/src/@components/producerProfile/index.tsx
+++ b/apps/desktop/src/@components/producerProfile/index.tsx
@@ -1,58 +1,48 @@
-import { useContext, useEffect } from "react";
-import { useLocation, useNavigate, useParams } from "react-router-dom";
-import { useRecoilValue, useResetRecoilState } from "recoil";
-import styled from "styled-components";
-import { ProfileEditBtnIc, UploadButtonIc } from "../../assets";
-import ProducerEmptyProfileImg from "../../assets/image/producerEmptyProfileImg.png";
-import { PlayerContext } from "../../context/playerContext";
-import useModal from "../../hooks/common/useModal";
-import useUpdateModal from "../../hooks/common/useUpdateModal";
+import styled from 'styled-components';
+import ProducerEmptyProfileImg from '../../assets/image/producerEmptyProfileImg.png';
+import useModal from '../../hooks/common/useModal';
+import useUpdateModal from '../../hooks/common/useUpdateModal';
+import BackButton from '../@common/button/backButton';
+import Profile from '../profile';
+import ProducerPortfolioInform from './producerPortfolioInform';
+import ProducerPortfolioList from './producerPortfolioList';
+import ProducerProfileShadow from './producerProfileShadow';
+import ProducerVocalSearching from './producerVocalSearching';
+import ProducerVocalSearchingInform from './producerVocalSearchingInform';
+import TracksProfileUploadModal from './tracksProfileUploadModal';
+import { useEffect } from 'react';
+import { useLocation, useNavigate, useParams } from 'react-router-dom';
+import { useRecoilValue, useResetRecoilState } from 'recoil';
+import { ProfileEditBtnIc, UploadButtonIc } from '../../assets';
import {
useGetProducerPortfolio,
useGetProducerProfile,
useGetProducerVocalSearching,
-} from "../../hooks/queries/mypage";
-import { clickedProfileId, hoveredProfileId, producerState } from "../../recoil/common/profile";
-import BackButton from "../@common/backButton";
-import Profile from "../profile";
-import ProducerPortfolioInform from "./producerPortfolioInform";
-import ProducerPortfolioList from "./producerPortfolioList";
-import ProducerProfileShadow from "./producerProfileShadow";
-import ProducerVocalSearching from "./producerVocalSearching";
-import ProducerVocalSearchingInform from "./producerVocalSearchingInform";
-import TracksProfileUploadModal from "./tracksProfileUploadModal";
+} from '../../hooks/queries/mypage';
+import { clickedProfileId, hoveredProfileId, producerState } from '../../recoil/common/profile';
+import { PlayUseContext } from '../../context/playerContext';
const PAGE_LIMIT = 5;
export default function ProducerProfile() {
- const { producerId } = useParams();
- const { producerProfile } = useGetProducerProfile(Number(producerId));
+ const prevURL = useLocation().state?.prevURL;
const navigate = useNavigate();
const resetClickedId = useResetRecoilState(clickedProfileId);
const resetHoveredId = useResetRecoilState(hoveredProfileId);
- const { producerPortfolios } = useGetProducerPortfolio({
+ const dataState = useRecoilValue(producerState);
+ const { openModal, showModal, unShowModal } = useModal();
+ const { unShowModal: unShowUpdateModal } = useUpdateModal();
+ const { producerId } = useParams();
+ const { data: producerProfile } = useGetProducerProfile(Number(producerId));
+ const { data: producerPortfolios } = useGetProducerPortfolio({
limit: PAGE_LIMIT,
userId: Number(producerId),
});
- const { producerVocalSearchings } = useGetProducerVocalSearching({
+ const { data: producerVocalSearchings } = useGetProducerVocalSearching({
limit: PAGE_LIMIT,
userId: Number(producerId),
});
-
- const { quitAudioForMovePage } = useContext(PlayerContext);
-
- const dataState = useRecoilValue(producerState);
- const { openModal, showModal, unShowModal } = useModal();
- const { unShowModal: unShowUpdateModal } = useUpdateModal();
-
- const prevURL = useLocation().state?.prevURL;
-
- useEffect(() => {
- resetClickedId();
- resetHoveredId();
- unShowModal();
- unShowUpdateModal();
- }, []);
+ const { quitAudioForMovePage } = PlayUseContext({});
function handleMoveProfileEditPage() {
quitAudioForMovePage();
@@ -63,6 +53,13 @@ export default function ProducerProfile() {
});
}
+ useEffect(() => {
+ resetClickedId();
+ resetHoveredId();
+ unShowModal();
+ unShowUpdateModal();
+ }, []);
+
return (
<>
{openModal && }
@@ -82,7 +79,7 @@ export default function ProducerProfile() {
- {dataState === "Portfolio" ? (
+ {dataState === 'Portfolio' ? (
<>
{producerPortfolios && producerPortfolios.length > 0 ? (
<>
diff --git a/apps/desktop/src/@components/producerProfile/producerPortfolioInform.tsx b/apps/desktop/src/@components/producerProfile/producerPortfolioInform.tsx
index b3989afbd..081ba75ab 100644
--- a/apps/desktop/src/@components/producerProfile/producerPortfolioInform.tsx
+++ b/apps/desktop/src/@components/producerProfile/producerPortfolioInform.tsx
@@ -1,13 +1,13 @@
-import { Fragment } from "react";
-import { useParams } from "react-router-dom";
-import { useRecoilValue } from "recoil";
-import styled from "styled-components";
-import { EllipsisIc, ProducerProfileTitleTextIc } from "../../assets";
-import useUpdateModal from "../../hooks/common/useUpdateModal";
-import { useGetProducerPortfolio } from "../../hooks/queries/mypage";
-import { clickedProfileId, hoveredProfileId } from "../../recoil/common/profile";
-import MusicInformation from "../portfolio/musicInformation";
-import PortfolioUpdateModal from "../portfolio/portfolioUpdateModal";
+import styled from 'styled-components';
+import useUpdateModal from '../../hooks/common/useUpdateModal';
+import MusicInformation from '../portfolio/musicInformation';
+import PortfolioUpdateModal from '../portfolio/portfolioUpdateModal';
+import { Fragment } from 'react';
+import { useParams } from 'react-router-dom';
+import { useRecoilValue } from 'recoil';
+import { EllipsisIc, ProducerProfileTitleTextIc } from '../../assets';
+import { useGetProducerPortfolio } from '../../hooks/queries/mypage';
+import { clickedProfileId, hoveredProfileId } from '../../recoil/common/profile';
interface ProducerPortfolioInformProp {
isMe: boolean | undefined;
@@ -18,27 +18,27 @@ const PAGE_LIMIT = 5;
export default function ProducerPortfolioInform(props: ProducerPortfolioInformProp) {
const { isMe } = props;
const { producerId } = useParams();
- const { producerPortfolios } = useGetProducerPortfolio({
+ const { data: producerPortfolios } = useGetProducerPortfolio({
limit: PAGE_LIMIT,
userId: Number(producerId),
});
-
const clickedId = useRecoilValue(clickedProfileId);
const hoveredId = useRecoilValue(hoveredProfileId);
const { openUpdateModal, showModal, unShowModal } = useUpdateModal();
- if (producerPortfolios === undefined) return null;
function handleShowUpdateModal() {
!openUpdateModal ? showModal() : unShowModal();
}
+ if (producerPortfolios === undefined) return null;
+
return (
{producerPortfolios?.map((producerPortfolio, index) => {
return (
- {((hoveredId === -1 && clickedId === producerPortfolio.portfolioId) ||
- (hoveredId !== -1 && hoveredId === producerPortfolio.portfolioId)) && (
+ {((hoveredId === '' && clickedId === producerPortfolio.portfolioId) ||
+ (hoveredId !== '' && hoveredId === producerPortfolio.portfolioId)) && (
<>
{index === 0 && }
diff --git a/apps/desktop/src/@components/producerProfile/producerPortfolioList.tsx b/apps/desktop/src/@components/producerProfile/producerPortfolioList.tsx
index 4bdb9a382..e83dffb1c 100644
--- a/apps/desktop/src/@components/producerProfile/producerPortfolioList.tsx
+++ b/apps/desktop/src/@components/producerProfile/producerPortfolioList.tsx
@@ -1,24 +1,21 @@
-import { useState } from "react";
-import { useParams } from "react-router-dom";
-import styled from "styled-components";
-import useInfiniteScroll from "../../hooks/common/useInfiniteScroll";
-import { useGetProducerPortfolio } from "../../hooks/queries/mypage";
-import { UserPortfolioType } from "../../type/profile";
-import ProducerPortfolio from "../portfolio/producerPortfolio";
+import styled from 'styled-components';
+import ProducerPortfolio from '../portfolio/producerPortfolio';
+import { useState } from 'react';
+import { useParams } from 'react-router-dom';
+import { useGetProducerPortfolio } from '../../hooks/queries/mypage';
+import { UserPortfolioType } from '../../type/profile';
const PAGE_LIMIT = 5;
export default function ProducerPortfolioList() {
const { producerId } = useParams();
- const { producerPortfolios, fetchNextPage, hasNextPage } = useGetProducerPortfolio({
+ const { data: producerPortfolios } = useGetProducerPortfolio({
limit: PAGE_LIMIT,
userId: Number(producerId),
});
+ const [playingTrack, setPLayingTrack] = useState(null);
- const { observerRef } = useInfiniteScroll(fetchNextPage, hasNextPage);
- const [playingTrack, setPLayingTrack] = useState(null);
-
- function selectTrack(trackId: UserPortfolioType["portfolioId"]) {
+ function selectTrack(trackId: UserPortfolioType['portfolioId']) {
setPLayingTrack(trackId);
}
@@ -36,16 +33,10 @@ export default function ProducerPortfolioList() {
/>
);
})}
-
);
}
-const Observer = styled.div`
- width: 100%;
- height: 10px;
-`;
-
const PortfolioWrapper = styled.div`
display: flex;
flex-direction: column;
diff --git a/apps/desktop/src/@components/producerProfile/producerProfileShadow.tsx b/apps/desktop/src/@components/producerProfile/producerProfileShadow.tsx
index a07ba7701..f80172569 100644
--- a/apps/desktop/src/@components/producerProfile/producerProfileShadow.tsx
+++ b/apps/desktop/src/@components/producerProfile/producerProfileShadow.tsx
@@ -1,24 +1,19 @@
-import { useContext } from "react";
-import { useRecoilState } from "recoil";
-import styled from "styled-components";
-import { ProducerProfileShadowIc, RightArrorIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
-import useModal from "../../hooks/common/useModal";
-import useUpdateModal from "../../hooks/common/useUpdateModal";
-import { clickedProfileId, hoveredProfileId, producerState } from "../../recoil/common/profile";
+import styled from 'styled-components';
+import useModal from '../../hooks/common/useModal';
+import useUpdateModal from '../../hooks/common/useUpdateModal';
+import { useRecoilState } from 'recoil';
+import { ProducerProfileShadowIc, RightArrorIc } from '../../assets';
+import { producerState } from '../../recoil/common/profile';
+import { PlayUseContext } from '../../context/playerContext';
export default function ProducerProfileShadow() {
const [dataState, setDataState] = useRecoilState(producerState);
- const [hoverId, setHoverId] = useRecoilState(hoveredProfileId);
- const [clickId, setClickId] = useRecoilState(clickedProfileId);
- const { quitAudioForMovePage } = useContext(PlayerContext);
const { unShowModal } = useModal();
const { unShowModal: unShowUpdateModal } = useUpdateModal();
+ const { quitAudioForMovePage } = PlayUseContext({});
function handleChangeDataState(state: string) {
setDataState(state);
- setHoverId(-1);
- setClickId(-1);
unShowModal();
unShowUpdateModal();
quitAudioForMovePage();
@@ -27,11 +22,11 @@ export default function ProducerProfileShadow() {
return (
- handleChangeDataState("Portfolio")}>
- {dataState === "Portfolio" && }Portfolio
+ handleChangeDataState('Portfolio')}>
+ {dataState === 'Portfolio' && }Portfolio
- handleChangeDataState("Vocal Searching")}>
- {dataState === "Vocal Searching" && }Vocal Searching
+ handleChangeDataState('Vocal Searching')}>
+ {dataState === 'Vocal Searching' && }Vocal Searching
@@ -52,7 +47,6 @@ const RightArrorIcon = styled(RightArrorIc)`
`;
const ProducerProfileShadowWrapper = styled.section`
- /* position: fixed; */
margin-left: 60rem;
`;
const ProducerProfileShadowIcon = styled(ProducerProfileShadowIc)`
diff --git a/apps/desktop/src/@components/producerProfile/producerVocalSearching.tsx b/apps/desktop/src/@components/producerProfile/producerVocalSearching.tsx
index 8e398ab64..6de30775d 100644
--- a/apps/desktop/src/@components/producerProfile/producerVocalSearching.tsx
+++ b/apps/desktop/src/@components/producerProfile/producerVocalSearching.tsx
@@ -1,38 +1,37 @@
-import { useState } from "react";
-import { useParams } from "react-router-dom";
-import { useRecoilState } from "recoil";
-import styled from "styled-components";
-import useInfiniteScroll from "../../hooks/common/useInfiniteScroll";
-import { useGetProducerVocalSearching } from "../../hooks/queries/mypage";
-import { clickedProfileId } from "../../recoil/common/profile";
-import { UserPortfolioType } from "../../type/profile";
-import ProducerVocalSearchingPortfolio from "./ProducerVocalSearchingPortfolio";
+import styled from 'styled-components';
+import ProducerVocalSearchingPortfolio from './ProducerVocalSearchingPortfolio';
+import { useState } from 'react';
+import { useParams } from 'react-router-dom';
+import { useRecoilState } from 'recoil';
+import { useGetProducerVocalSearching } from '../../hooks/queries/mypage';
+import { clickedProfileId } from '../../recoil/common/profile';
+import { UserPortfolioType } from '../../type/profile';
const PAGE_LIMIT = 5;
export default function ProducerVocalSearching() {
const { producerId } = useParams();
- const { producerVocalSearchings, fetchNextPage, hasNextPage } = useGetProducerVocalSearching({
+ const { data: producerVocalSearchings } = useGetProducerVocalSearching({
limit: PAGE_LIMIT,
userId: Number(producerId),
});
+ const [clickId] = useRecoilState(clickedProfileId);
+ const [playingTrack, setPLayingTrack] = useState(null);
- const [clickId, setClickId] = useRecoilState(clickedProfileId);
- const { observerRef } = useInfiniteScroll(fetchNextPage, hasNextPage);
- const [playingTrack, setPLayingTrack] = useState(null);
-
- function selectTrack(trackId: UserPortfolioType["portfolioId"]) {
+ function selectTrack(trackId: UserPortfolioType['portfolioId']) {
setPLayingTrack(trackId);
}
- if (producerVocalSearchings === undefined) return null;
function checkFirstTrackPlaying() {
if (producerVocalSearchings) {
return clickId === producerVocalSearchings[0].trackId;
}
+
return false;
}
+ if (producerVocalSearchings === undefined) return null;
+
return (
{producerVocalSearchings?.map((producerVocalSearchings) => {
@@ -44,16 +43,10 @@ export default function ProducerVocalSearching() {
/>
);
})}
-
);
}
-const Observer = styled.div`
- width: 100%;
- height: 10px;
-`;
-
const PortfolioWrapper = styled.div<{ isFirstPlaying: boolean }>`
display: flex;
flex-direction: column;
diff --git a/apps/desktop/src/@components/producerProfile/producerVocalSearchingInform.tsx b/apps/desktop/src/@components/producerProfile/producerVocalSearchingInform.tsx
index ad954b82d..35c056320 100644
--- a/apps/desktop/src/@components/producerProfile/producerVocalSearchingInform.tsx
+++ b/apps/desktop/src/@components/producerProfile/producerVocalSearchingInform.tsx
@@ -1,14 +1,14 @@
-import { Fragment } from "react";
-import { useParams } from "react-router-dom";
-import { useRecoilValue } from "recoil";
-import styled from "styled-components";
-import { EllipsisIc, ProducerProfileTitleTextIc } from "../../assets";
-import useUpdateModal from "../../hooks/common/useUpdateModal";
-import { useGetProducerVocalSearching } from "../../hooks/queries/mypage";
-import { clickedProfileId, hoveredProfileId } from "../../recoil/common/profile";
-import PortfolioUpdateModal from "../portfolio/portfolioUpdateModal";
-import ViewMoreButton from "./viewMoreButton";
-import VocalSearchingMusicInform from "./vocalSearchingMusicInform";
+import styled from 'styled-components';
+import useUpdateModal from '../../hooks/common/useUpdateModal';
+import PortfolioUpdateModal from '../portfolio/portfolioUpdateModal';
+import ViewMoreButton from './viewMoreButton';
+import VocalSearchingMusicInform from './vocalSearchingMusicInform';
+import { Fragment } from 'react';
+import { useParams } from 'react-router-dom';
+import { useRecoilValue } from 'recoil';
+import { EllipsisIc } from '../../assets';
+import { useGetProducerVocalSearching } from '../../hooks/queries/mypage';
+import { clickedProfileId, hoveredProfileId } from '../../recoil/common/profile';
interface ProducerVocalSearchingInformProp {
isMe: boolean | undefined;
@@ -19,28 +19,27 @@ const PAGE_LIMIT = 5;
export default function ProducerVocalSearchingInform(props: ProducerVocalSearchingInformProp) {
const { isMe } = props;
const { producerId } = useParams();
- const { producerVocalSearchings } = useGetProducerVocalSearching({
+ const { data: producerVocalSearchings } = useGetProducerVocalSearching({
limit: PAGE_LIMIT,
userId: Number(producerId),
});
-
const clickedId = useRecoilValue(clickedProfileId);
const hoveredId = useRecoilValue(hoveredProfileId);
const { openUpdateModal, showModal, unShowModal } = useUpdateModal();
- if (producerVocalSearchings === undefined) return null;
-
function handleShowUpdateModal() {
!openUpdateModal ? showModal() : unShowModal();
}
+ if (producerVocalSearchings === undefined) return null;
+
return (
{producerVocalSearchings?.map((producerVocalSearching, index) => {
return (
- {((hoveredId === -1 && clickedId === producerVocalSearching.trackId) ||
- (hoveredId !== -1 && hoveredId === producerVocalSearching.trackId)) && (
+ {((hoveredId === '' && clickedId === producerVocalSearching.trackId) ||
+ (hoveredId !== '' && hoveredId === producerVocalSearching.trackId)) && (
<>
{clickedId === producerVocalSearching.trackId && (
@@ -84,10 +83,6 @@ const TitleSection = styled.header`
width: 38rem;
`;
-const ProducerProfileTitleTextIcon = styled(ProducerProfileTitleTextIc)`
- width: 13.4rem;
-`;
-
const InformContainer = styled.section`
width: 44rem;
height: 100%;
@@ -98,7 +93,3 @@ const InformContainer = styled.section`
position: fixed;
right: 0;
`;
-
-const TitleIconWrapper = styled.div`
- width: 13.4rem;
-`;
diff --git a/apps/desktop/src/@components/producerProfile/tracksProfileUploadModal.tsx b/apps/desktop/src/@components/producerProfile/tracksProfileUploadModal.tsx
index 62f29f6b6..a6b13299a 100644
--- a/apps/desktop/src/@components/producerProfile/tracksProfileUploadModal.tsx
+++ b/apps/desktop/src/@components/producerProfile/tracksProfileUploadModal.tsx
@@ -1,22 +1,21 @@
-import { useLocation, useNavigate } from "react-router-dom";
-import styled from "styled-components";
+import styled from 'styled-components';
+import useModal from '../../hooks/common/useModal';
+import { useLocation, useNavigate } from 'react-router-dom';
import {
PortfolioIc,
PortfolioTextIc,
ProducerProfileUploadeModalIc,
VocalSearchingIc,
VocalSearchingTextIc,
-} from "../../assets";
-import useModal from "../../hooks/common/useModal";
+} from '../../assets';
export default function TracksProfileUploadModal() {
const navigate = useNavigate();
const prevURL = useLocation().state.prevURL;
-
const { modalRef } = useModal();
function moveVocalSearching() {
- navigate("/upload/producer/vocal-searching", {
+ navigate('/upload/producer/vocal-searching', {
state: {
prevURL: prevURL,
},
@@ -24,7 +23,7 @@ export default function TracksProfileUploadModal() {
}
function movePortfolio() {
- navigate("/upload/producer/portfolio", {
+ navigate('/upload/producer/portfolio', {
state: {
prevURL: prevURL,
},
@@ -61,7 +60,6 @@ const ModalBackgroundShadow = styled.section`
width: 192rem;
height: 108rem;
- /* position: fixed; */
background: rgba(0, 0, 0, 0.6);
`;
@@ -86,7 +84,6 @@ const VocalSearchingWrapper = styled.article`
display: flex;
padding-top: 1.5rem;
- /* top: 6rem; */
`;
const VocalSearchingIcon = styled(VocalSearchingIc)`
@@ -98,7 +95,6 @@ const PortfolioWrapper = styled.article`
position: absolute;
display: flex;
- /* top: 4rem; */
`;
const PortfolioIcon = styled(PortfolioIc)`
diff --git a/apps/desktop/src/@components/producerProfile/viewMoreButton.tsx b/apps/desktop/src/@components/producerProfile/viewMoreButton.tsx
index f249064d7..1215cf7b4 100644
--- a/apps/desktop/src/@components/producerProfile/viewMoreButton.tsx
+++ b/apps/desktop/src/@components/producerProfile/viewMoreButton.tsx
@@ -1,18 +1,18 @@
-import { useContext, useState } from "react";
-import { useNavigate } from "react-router-dom";
-import styled, { css, keyframes } from "styled-components";
-import { ProducerVocalSearchingArrowIc, ProducerVocalSearchingViewMoreTextIc } from "../../assets";
-import { PlayerContext } from "../../context/playerContext";
+import styled, { css, keyframes } from 'styled-components';
+import { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import { ProducerVocalSearchingArrowIc, ProducerVocalSearchingViewMoreTextIc } from '../../assets';
+import { PlayUseContext } from '../../context/playerContext';
interface ViewMoreButtonProp {
- id: number;
+ id: string;
}
export default function ViewMoreButton(props: ViewMoreButtonProp) {
const { id } = props;
- const [ishoverd, setIshoverd] = useState(false);
const navigate = useNavigate();
- const { quitAudioForMovePage } = useContext(PlayerContext);
+ const { quitAudioForMovePage } = PlayUseContext({});
+ const [ishoverd, setIshoverd] = useState(false);
function checkViewMoreHover() {
ishoverd ? setIshoverd(false) : setIshoverd(true);
diff --git a/apps/desktop/src/@components/producerProfile/vocalSearchingMusicInform.tsx b/apps/desktop/src/@components/producerProfile/vocalSearchingMusicInform.tsx
index 4106659e0..7e8cc9b3d 100644
--- a/apps/desktop/src/@components/producerProfile/vocalSearchingMusicInform.tsx
+++ b/apps/desktop/src/@components/producerProfile/vocalSearchingMusicInform.tsx
@@ -1,6 +1,6 @@
-import styled from "styled-components";
-import { ProducerVocalSearchingType } from "../../type/profile";
-import HashTag from "../profile/hashtag";
+import styled from 'styled-components';
+import HashTag from '../profile/hashtag';
+import { ProducerVocalSearchingType } from '../../type/profile';
interface MusicInformationProps {
portfolio: ProducerVocalSearchingType;
@@ -51,12 +51,6 @@ const InformContent = styled.p`
margin-bottom: 2.4rem;
`;
-const InformTag = styled.div<{ textLength: number }>`
- display: flex;
-
- padding: 0 1.5rem;
-`;
-
const InformTagWrapper = styled.div`
display: flex;
flex-wrap: wrap;
diff --git a/apps/desktop/src/@components/profile/hashtag.tsx b/apps/desktop/src/@components/profile/hashtag.tsx
index 6d3a98361..cf65023bb 100644
--- a/apps/desktop/src/@components/profile/hashtag.tsx
+++ b/apps/desktop/src/@components/profile/hashtag.tsx
@@ -1,10 +1,10 @@
-import styled from "styled-components";
+import styled from 'styled-components';
-interface HashTag {
+interface HashTagProps {
text: string;
}
-export default function HashTag(props: HashTag) {
+export default function HashTag(props: HashTagProps) {
const { text } = props;
return (
diff --git a/apps/desktop/src/@components/profile/index.tsx b/apps/desktop/src/@components/profile/index.tsx
index c9fb3ad23..d9cdd83f0 100644
--- a/apps/desktop/src/@components/profile/index.tsx
+++ b/apps/desktop/src/@components/profile/index.tsx
@@ -1,25 +1,25 @@
-import styled from "styled-components";
-import { SleeperAccountIc } from "../../assets";
-import { UserProfileType } from "../../type/profile";
-import ProducerProfileImage from "./producerProfileImage";
-import ProfileCategory from "./profileCategory";
-import ProfileDescription from "./profileDescription";
-import ProfileHashtags from "./profileHashtags";
-import VocalProfileImage from "./vocalProfileImage";
+import styled from 'styled-components';
+import ProducerProfileImage from './producerProfileImage';
+import ProfileCategory from './profileCategory';
+import ProfileDescription from './profileDescription';
+import ProfileHashtags from './profileHashtags';
+import VocalProfileImage from './vocalProfileImage';
+import { SleeperAccountIc } from '../../assets';
+import { UserProfileType } from '../../type/profile';
interface ProfileProps {
- userType: string | undefined;
- userSelf: boolean | undefined;
- userProfile: UserProfileType | undefined;
+ userType?: string;
+ userSelf?: boolean;
+ userProfile?: UserProfileType;
}
export default function Profile(props: ProfileProps) {
- const { userType, userSelf, userProfile } = props;
+ const { userType, userProfile } = props;
return (
- {userType === "vocal" && }
- {userType === "producer" && }
+ {userType === 'vocal' && }
+ {userType === 'producer' && }
{userProfile?.userName}
{userProfile?.userTrackSearch && }
diff --git a/apps/desktop/src/@components/profile/producerProfileImage.tsx b/apps/desktop/src/@components/profile/producerProfileImage.tsx
index 86795c57a..1f1a5ecce 100644
--- a/apps/desktop/src/@components/profile/producerProfileImage.tsx
+++ b/apps/desktop/src/@components/profile/producerProfileImage.tsx
@@ -1,10 +1,10 @@
-import { useParams } from "react-router-dom";
-import styled from "styled-components";
-import { useGetProducerProfile } from "../../hooks/queries/mypage";
+import styled from 'styled-components';
+import { useParams } from 'react-router-dom';
+import { useGetProducerProfile } from '../../hooks/queries/mypage';
export default function ProducerProfileImage() {
const { producerId } = useParams();
- const { producerProfile } = useGetProducerProfile(Number(producerId));
+ const { data: producerProfile } = useGetProducerProfile(Number(producerId));
return (
diff --git a/apps/desktop/src/@components/profile/profileDescription.tsx b/apps/desktop/src/@components/profile/profileDescription.tsx
index d9fea906b..bb8a8ff5e 100644
--- a/apps/desktop/src/@components/profile/profileDescription.tsx
+++ b/apps/desktop/src/@components/profile/profileDescription.tsx
@@ -1,6 +1,6 @@
-import styled from "styled-components";
-import { DescriptionIc } from "../../assets";
-import Empty from "./empty";
+import styled from 'styled-components';
+import Empty from './empty';
+import { DescriptionIc } from '../../assets';
interface ProfileDescriptionProps {
introduce: string | undefined;
diff --git a/apps/desktop/src/@components/profile/profileHashtags.tsx b/apps/desktop/src/@components/profile/profileHashtags.tsx
index 787d9dc21..596518b43 100644
--- a/apps/desktop/src/@components/profile/profileHashtags.tsx
+++ b/apps/desktop/src/@components/profile/profileHashtags.tsx
@@ -1,7 +1,7 @@
-import styled from "styled-components";
-import { HashtagIc } from "../../assets";
-import Empty from "./empty";
-import HashTag from "./hashtag";
+import styled from 'styled-components';
+import Empty from './empty';
+import HashTag from './hashtag';
+import { HashtagIc } from '../../assets';
interface ProfileHashtagsProps {
keywords: string[] | undefined;
diff --git a/apps/desktop/src/@components/profile/vocalProfileImage.tsx b/apps/desktop/src/@components/profile/vocalProfileImage.tsx
index 33595dcfa..f79243d77 100644
--- a/apps/desktop/src/@components/profile/vocalProfileImage.tsx
+++ b/apps/desktop/src/@components/profile/vocalProfileImage.tsx
@@ -1,6 +1,6 @@
-import { useParams } from "react-router-dom";
-import styled from "styled-components";
-import { useGetVocalProfile } from "../../hooks/queries/mypage";
+import styled from 'styled-components';
+import { useParams } from 'react-router-dom';
+import { useGetVocalProfile } from '../../hooks/queries/mypage';
export default function VocalProfileImage() {
const { vocalId } = useParams();
diff --git a/apps/desktop/src/@components/profileEdit/descriptionInput.tsx b/apps/desktop/src/@components/profileEdit/descriptionInput.tsx
new file mode 100644
index 000000000..380412840
--- /dev/null
+++ b/apps/desktop/src/@components/profileEdit/descriptionInput.tsx
@@ -0,0 +1,72 @@
+import styled from 'styled-components';
+import TextareaAutosize from 'react-textarea-autosize';
+import { useFormContext } from 'react-hook-form';
+import { TEXT_LIMIT } from '../../core/common/textLimit';
+import TextLength from '../upload/textLength';
+
+interface DescriptionInputProps {
+ maxLength: (typeof TEXT_LIMIT)[keyof typeof TEXT_LIMIT];
+}
+
+export function DescriptionInput(props: DescriptionInputProps) {
+ const { maxLength } = props;
+ const { register, watch } = useFormContext();
+ return (
+
+
+
+
+
+
+ );
+}
+
+const DescriptionText = styled(TextareaAutosize)`
+ width: 100%;
+
+ color: ${({ theme }) => theme.colors.white};
+ ${({ theme }) => theme.fonts.description};
+
+ border-bottom: 1px solid ${({ theme }) => theme.colors.gray2};
+
+ margin-top: 1.7rem;
+ padding-bottom: 1rem;
+
+ white-space: pre-wrap;
+ outline: none;
+ word-wrap: break-word;
+ word-break: break-word;
+ background: transparent;
+ border-top: transparent;
+ border-left: transparent;
+ border-right: transparent;
+
+ ::placeholder {
+ color: ${({ theme }) => theme.colors.gray3};
+ ${({ theme }) => theme.fonts.description};
+ }
+
+ &:focus {
+ border-color: ${({ theme }) => theme.colors.white};
+ }
+
+ resize: none;
+`;
+
+const DescriptionInputWrapper = styled.div`
+ width: 100%;
+ margin-top: 4.5rem;
+`;
+
+const TextLengthWrapper = styled.div`
+ ${({ theme }) => theme.fonts.description};
+
+ float: right;
+ margin-top: 1.8rem;
+`;
diff --git a/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerContactEdit.tsx b/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerContactEdit.tsx
index 835dd0453..ea70e70af 100644
--- a/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerContactEdit.tsx
+++ b/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerContactEdit.tsx
@@ -1,6 +1,6 @@
-import InputContainer from "../../@common/inputContainer";
-import styled from "styled-components";
-import { UseFormReturn } from "react-hook-form";
+import styled from 'styled-components';
+import InputContainer from '../../@common/form/inputContainer';
+import { UseFormReturn } from 'react-hook-form';
interface ProducerContactEditProps {
methods: UseFormReturn<
@@ -21,7 +21,7 @@ export default function ProducerContactEdit(props: ProducerContactEditProps) {
return (
-
+
);
diff --git a/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerImageEdit.tsx b/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerImageEdit.tsx
index 81573fd57..6d8964cfa 100644
--- a/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerImageEdit.tsx
+++ b/apps/desktop/src/@components/profileEdit/producerProfileEdit/producerImageEdit.tsx
@@ -1,7 +1,7 @@
-import styled, { css } from "styled-components";
-import { UploadFileChangeIc } from "../../../assets";
-import UploadProducerDefaultImg from "../../../assets/image/uploadProducerDefaultImg.png";
-import useFileHover from "../../../hooks/common/useFileHover";
+import styled, { css } from 'styled-components';
+import UploadProducerDefaultImg from '../../../assets/image/uploadProducerDefaultImg.png';
+import useFileHover from '../../../hooks/common/useFileHover';
+import { UploadFileChangeIc } from '../../../assets';
interface ProducerImageEditProps {
previewImage: string | null;
@@ -17,7 +17,7 @@ export default function ProducerImageEdit(props: ProducerImageEditProps) {