Skip to content

Commit

Permalink
Merge pull request #9 from wafflestudio/feat/common
Browse files Browse the repository at this point in the history
Feat/common
  • Loading branch information
Joeyoojin authored Feb 4, 2025
2 parents 55e9a1f + 33fdc86 commit a7e9e40
Show file tree
Hide file tree
Showing 32 changed files with 297 additions and 308 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"postcss": "^8.4.49",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^3.0.1",
"tailwindcss": "^3.4.17"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { RouterProvider } from 'react-router-dom';

import { router } from './router';
import { router } from './route/router.tsx';
import '@/styles/styles.css';

function App() {
const queryClient = new QueryClient();

return (
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
Expand Down
11 changes: 11 additions & 0 deletions src/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Outlet } from 'react-router-dom';

const Layout = () => {
return (
<div className="relative mx-auto flex h-screen w-full max-w-[560px] flex-col items-center overflow-hidden">
<Outlet />
</div>
);
};

export default Layout;
7 changes: 7 additions & 0 deletions src/Layout/SideBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const SideBar = () => {
return (
<div className="fixed left-0 top-0 h-screen w-[70px] bg-[#ECECEC]"></div>
);
};

export default SideBar;
2 changes: 1 addition & 1 deletion src/assets/icons/backward-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions src/assets/images/signup.svg

This file was deleted.

Binary file removed src/assets/images/wemade-logo-black.png
Binary file not shown.
3 changes: 3 additions & 0 deletions src/assets/images/wemade-logo-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 0 additions & 19 deletions src/assets/images/wemade-logo-gray-small.svg

This file was deleted.

3 changes: 3 additions & 0 deletions src/assets/images/wemade-logo-gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 0 additions & 21 deletions src/components/Auth.tsx

This file was deleted.

25 changes: 0 additions & 25 deletions src/components/BigButton.tsx

This file was deleted.

9 changes: 3 additions & 6 deletions src/components/InfoCard/InfoDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@ type InfoDetailProps = {
const InfoDetail = ({ title, content }: InfoDetailProps) => {
return (
<div className="flex flex-col">
<div className="mb-3.5 font-psemibold text-[15px]">{title}</div>{' '}
{/* title 아래 마진 14px */}
<div className="mb-3.5 text-[15px] font-semibold">{title}</div>{' '}
{Array.isArray(content) ? (
<div className="flex flex-col gap-2.5">
{' '}
{/* content 사이 gap 10px */}
{content.map((item, index) => (
<div
key={index}
className="font-pmedium text-sm font-normal"
className="text-sm font-normal"
>
{item}
</div>
))}
</div>
) : (
<div className="font-pmedium text-sm font-normal">{content}</div>
<div className="text-sm font-normal">{content}</div>
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoCard/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Tag = ({ label, isPosition = false, linkTo }: TagProps) => {
const navigate = useNavigate();

const baseStyles =
'h-[26px] inline-block cursor-pointer rounded-md px-3 py-[5px] font-pmedium leading-[16.71px] transition-colors';
'h-[26px] inline-block cursor-pointer rounded-md px-3 py-[5px] leading-[16.71px] transition-colors';

const colorStyles = isPosition
? 'bg-black text-white'
Expand Down
9 changes: 0 additions & 9 deletions src/components/Layout.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions src/components/LoginButton.tsx

This file was deleted.

26 changes: 26 additions & 0 deletions src/components/common/BackButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useNavigate } from 'react-router-dom';

import { Icons } from '@/constants/icons.tsx';

const BackButton = ({ linkTo = '-1' }: { linkTo?: string }) => {
const navigate = useNavigate();

const handleClick = () => {
if (linkTo === '-1') {
navigate(-1);
} else if (linkTo) {
navigate(linkTo);
}
};

return (
<div
className="flex h-[60px] w-[60px] cursor-pointer items-center justify-center rounded-full border border-borderGray bg-white transition-colors hover:bg-backgroundGray"
onClick={handleClick}
>
{Icons.Backward}
</div>
);
};

export default BackButton;
Loading

0 comments on commit a7e9e40

Please sign in to comment.