diff --git a/.vscode/settings.json b/.vscode/settings.json index 4533bc6..bf89505 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,8 @@ "typescript.tsdk": ".yarn/sdks/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true + "editor.formatOnSave": true, + "[typescriptreact]": { + "editor.defaultFormatter": "vscode.typescript-language-features" + } } diff --git a/packages/user/src/apis/Main.ts b/packages/user/src/apis/Main.ts new file mode 100644 index 0000000..a109145 --- /dev/null +++ b/packages/user/src/apis/Main.ts @@ -0,0 +1,5 @@ +import { instance } from './axios'; + +export const getProjects = async () => { + return await instance.get('/project/list'); +}; diff --git a/packages/user/src/apis/latestProject.ts b/packages/user/src/apis/latestProject.ts deleted file mode 100644 index e69de29..0000000 diff --git a/packages/user/src/pages/Main.tsx b/packages/user/src/pages/Main.tsx index 6b3b3c3..b442fc1 100644 --- a/packages/user/src/pages/Main.tsx +++ b/packages/user/src/pages/Main.tsx @@ -3,19 +3,19 @@ import { LatestProject } from '../components/Main/LatestProject'; import { theme } from '@merge/design-system'; import styled from '@emotion/styled'; import BannerImg from '../assets/banner.png'; -import TopPageButtonImg from '../assets/topPageButton.svg'; +import ScrollImg from "../assets/topPageButton.svg"; import { useRef } from 'react'; export const Main = () => { - const banner = useRef(null); + const container = useRef(null); const scrollToTop = () => { - if (banner.current) { - banner.current.scrollIntoView({ behavior: 'smooth' }); + if (container.current) { + container.current.scroll({ top: 0, behavior: 'smooth' }); } }; return ( - - + + 즐겨찾는 프로젝트 @@ -63,6 +63,7 @@ const LatestProjectContainer = styled.div` `; const TopPageButton = styled.div` + background-image: url(${ScrollImg}); position: fixed; width: 50px; height: 50px; @@ -70,11 +71,10 @@ const TopPageButton = styled.div` top: 85%; left: 81%; border: 1px solid ${theme.color.primary100}; - background-image: url(${TopPageButtonImg}); background-repeat: no-repeat; background-position: center center; &:hover { cursor: pointer; } -`; +`; \ No newline at end of file