Skip to content

Commit

Permalink
Merge pull request #15 from Team-Wander/feature/approveAppointmentModal
Browse files Browse the repository at this point in the history
๐Ÿ”€ ์•ฝ์†์Šน์ธ๋ชจ๋‹ฌ ์ œ์ž‘
  • Loading branch information
pki071120 authored Oct 8, 2024
2 parents aa17482 + 33843d8 commit 507ab0b
Show file tree
Hide file tree
Showing 19 changed files with 700 additions and 103 deletions.
23 changes: 11 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
"browser": true,
"es2021": true
},
"extends": [
"react-app",
"react-app/jest",
"prettier"
],
"settings": {
"import/resolver": {
"typescript": {}
},
"react": {
"version": "detect"
}
},
"extends": ["prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react", "prettier"],
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"no-console": "warn",
"no-duplicate-imports": "error",
"indent": "warn",
"indent": ["error", 2],
"linebreak-style": 0,
"import/prefer-default-export": "off",
"react/prop-types": "off",
"prettier/prettier": "error"
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@ dist
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.pnp.*

# ds_store
.ds_store
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"arrowParens": "always",
"singleQuote": true,
"semi": true,
"endOfLine": "auto"
"endOfLine": "auto",
"tabWidth": 2
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Wanderring-Client
ํ”„๋กœ์ ํŠธ ์ง„ํ–‰ ์ค‘...

ํผ๋ธ”๋ฆฌ์‹ฑ ์ง„ํ–‰์ค‘
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
];
];
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"axios": "^1.7.5",
"eslint-config-airbnb": "^19.0.4",
"eslint-import-resolver-babel-module": "^5.3.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import": "^2.30.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.0",
Expand All @@ -29,13 +29,16 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint lint",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write **/*.{ts,tsx}"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
"react-app/jest",
"react",
"eslint:recommended"
]
},
"browserslist": {
Expand All @@ -51,16 +54,19 @@
]
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"eslint": "^8.57.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@eslint/js": "^9.11.0",
"eslint": "^9.11.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"typescript-eslint": "^8.2.0"
"typescript-eslint": "^8.6.0"
}
}
10 changes: 9 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import { Home, Write, InputPage } from 'pages';
import {
Home,
Write,
InputPage,
Temp,
NoPage,
} from 'pages';

function App() {
return (
<Routes>
<Route path="*" element={<NoPage />} />
<Route path="/" element={<Home />} />
<Route path="/write" element={<Write />} />
<Route
path="/input"
element={<InputPage />}
/>
<Route path="/temp" element={<Temp />} />
</Routes>
);
}
Expand Down
62 changes: 62 additions & 0 deletions src/components/Modal/ApproveAppointment/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import React, { useState } from 'react';
import * as S from './style';
import { Profile } from 'components';
import {
gradeType,
genderType,
} from 'types/Card';
import MateList from 'components/Post/PostCard/MateList';

interface Props {
onClose?: () => void;
}

interface data {
title: string;
grade: gradeType[];
gender: genderType;
profile: {
img: string;
name: string;
info: string;
};
}

const ApproveAppointmentModal: React.FC<
Props
> = ({ onClose }) => {
const [data, setData] = useState<data>({
title: 'hello',
grade: ['ONE'],
gender: 'ANY',
profile: {
img: '',
name: '',
info: '',
},
});

return (
<S.Wrapper>
<S.TitleBox>
<S.Title onClick={onClose}>
{data?.title}
</S.Title>
<MateList
grade={data?.grade}
gender={data?.gender}></MateList>
</S.TitleBox>
<S.Contents onClick={() => setData(data)}>
<Profile />
<S.ButtonWrapper>
<S.Button agreement>์ˆ˜๋ฝ</S.Button>
<S.Button agreement={false}>
๊ฑฐ์ ˆ
</S.Button>
</S.ButtonWrapper>
</S.Contents>
</S.Wrapper>
);
};

export default ApproveAppointmentModal;
57 changes: 57 additions & 0 deletions src/components/Modal/ApproveAppointment/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import styled from '@emotion/styled';

export const Wrapper = styled.div`
display: flex;
width: 42.5rem;
padding: 1rem 1.25rem;
flex-direction: column;
align-items: flex-start;
gap: 1.25rem;
border-radius: 0.5rem;
/* background: white; */
background: lightgrey;
`;

export const TitleBox = styled.div`
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
`;

export const Title = styled.h2`
color: var(--BLACK-black, #333);
font-size: 1.125rem;
font-weight: 600;
line-height: 150%;
`;

export const Contents = styled.div`
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
`;

export const ButtonWrapper = styled.div`
display: flex;
flex-direction: row;
gap: 1.25rem;
`;

export const Button = styled.button<{
agreement: boolean;
}>`
display: flex;
padding: 0.75rem 1.75rem;
justify-content: center;
align-items: center;
gap: 0.625rem;
border: 0;
border-radius: 0.5rem;
background: ${({ theme, agreement }) =>
agreement
? theme.color.main
: theme.color.system};
color: ${({ theme }) => theme.color.white};
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Container from '../container';
import * as S from './style';
import { XIcon, SelectButton } from 'svg';
import { ReportType } from 'types';
import { useNavigate } from 'react-router-dom';
// import { useNavigate } from 'react-router-dom';

interface Props {
onClose: () => void;
Expand All @@ -12,7 +12,7 @@ interface Props {

const DeclarationModal: React.FC<Props> = ({
onClose,
postId,
// postId,
}) => {
// const [id, setId] = useState(postId); //์ถ”ํ›„์— ์‹ ๊ณ ํ•  ๊ฒŒ์‹œ๋ฌผ์˜ ์•„์ด๋””๋ฅผ ๋ฐ›์•„์™€์„œ ๋ฐฑ์—”๋“œ์—๊ฒŒ ๋ณด๋‚ด์ค„ ์˜ˆ์ •
// const navigation = useNavigate();
Expand Down
3 changes: 2 additions & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as DeclarationModal } from './DeclarationModal';
export { default as DeclarationModal } from './Declaration';
export { default as ApproveAppointmentModal } from './ApproveAppointment';
21 changes: 21 additions & 0 deletions src/components/Profile/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import * as S from './style';

const Profile = () => {
return (
<S.Container>
<S.ProfileImg
src="https://item.kakaocdn.net/do/493188dee481260d5c89790036be0e668b566dca82634c93f811198148a26065"
alt="์•„๋ฌด์‚ฌ์ง„"
/>
<S.TextBox>
<S.Name>ํ•œ์žฌํ˜•</S.Name>
<S.School>
๊ด‘์ฃผ์†Œํ”„ํŠธ์›จ์–ด๋งˆ์ด์Šคํ„ฐ๊ณ 
</S.School>
</S.TextBox>
</S.Container>
);
};

export default Profile;
33 changes: 33 additions & 0 deletions src/components/Profile/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import styled from '@emotion/styled';

export const Container = styled.div`
display: flex;
justify-content: center;
align-items: center;
gap: 0.75rem;
`;

export const ProfileImg = styled.img`
border-radius: 100%;
width: 3rem;
height: 3rem;
`;

export const TextBox = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
`;

export const Name = styled.h2`
color: ${({ theme }) => theme.color.gray[800]};
font-size: 1rem;
${({ theme }) => theme.fontStyle.m3}
`;

export const School = styled.h2`
color: ${({ theme }) => theme.color.gray[600]};
font-size: 1rem;
${({ theme }) => theme.fontStyle.m3}
`;
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './Modal';
export * from './Post';
export * from './Input';
export { default as Profile } from './Profile';
11 changes: 11 additions & 0 deletions src/pages/NoPage/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const NoPage = () => {
return (
<div>
This Page is not defined. Try another pages
</div>
);
};

export default NoPage;
2 changes: 2 additions & 0 deletions src/pages/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export { default as Home } from './home';
export { default as Write } from './write';
export { default as InputPage } from './InputPage';
export { default as Temp } from './temp';
export { default as NoPage } from './NoPage';
8 changes: 8 additions & 0 deletions src/pages/temp/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';

const temp = () => {
// ์Šคํ† ๋ฆฌ๋ถ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์œผ๋‹ˆ ์ž„์‹œ๋กœ ์—ฌ๊ธฐ์—๋‹ค๊ฐ€ ๋งŒ๋“œ์‹  ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜์…”์„œ ํ™•์ธํ•˜์‹œ๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
return <></>;
};

export default temp;
Loading

0 comments on commit 507ab0b

Please sign in to comment.