Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
"@vanilla-extract/sprinkles": "^1.6.3",
"@vanilla-extract/vite-plugin": "^5.0.1",
"axios": "^1.10.0",
"fabric": "^6.7.1",
"framer-motion": "^12.15.0",
"katex": "^0.16.22",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-error-boundary": "^6.0.0",
"react-icons": "^5.5.0",
"react-router-dom": "^7.6.1"
},
"devDependencies": {
Expand Down
754 changes: 754 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/pages/login/login.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const buttonWrapper = style({
width: '100%',
maxWidth: '48rem',

padding: '0 3.6rem 1.6rem',
padding: '0 3.6rem 2.4rem',
gap: '1.2rem',
alignItems: 'center',
bottom: '0',
Expand Down
3 changes: 2 additions & 1 deletion src/pages/loginCallback/LoginCallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom';
import axios from 'axios';
import { routePath } from '@routes/routePath';
import { instance } from '@apis/instance';
import Loading from '@pages/loading/Loading';

import { tokenService } from '@/shared/auth/services/tokenService';
import { API_URL } from '@/shared/constants/apiURL';
Expand Down Expand Up @@ -93,7 +94,7 @@ const LoginCallback = () => {
handleLogin();
}, [navigate]);

return <div />;
return <Loading />;
};

export default LoginCallback;
22 changes: 22 additions & 0 deletions src/pages/my/My.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getKoreanParticle } from '@utils/korParticle';
import { useNavigate } from 'react-router-dom';
import { routePath } from '@routes/routePath';
import { themeVars } from '@styles/theme.css';
import Toast from '@components/toast/Toast';

import * as styles from './my.css';
import { useDeleteMe, useGetMe } from './apis/queries';
Expand All @@ -21,6 +22,7 @@ const My = () => {

const [expanded, setExpanded] = useState(false);
const [isModalOpen, setIsModalOpen] = useState(false);
const [showToast, setShowToast] = useState(false);

const { data, isPending } = useGetMe();
const { mutateAsync: deleteMe } = useDeleteMe();
Expand All @@ -32,6 +34,14 @@ const My = () => {
await deleteMe();
};

const goWhiteboard = () => {
if (window.innerWidth >= 768) {
navigate(routePath.SIMPLE_WHITEBOARD);
} else {
setShowToast(true);
}
};

const mappedChips = useMemo(() => {
return (
data?.unitsList?.map((unit) => {
Expand Down Expand Up @@ -181,6 +191,11 @@ const My = () => {

{/* 공통 버튼 영역 */}
<div className={styles.buttonContainer}>
<button type="button" className={styles.button} onClick={goWhiteboard}>
연습장
<IcRightArrow width={6} height={12} color={themeVars.color.gray800} />
</button>

<button
type="button"
className={styles.button}
Expand All @@ -199,6 +214,13 @@ const My = () => {
onClose={closeModal}
onConfirm={handleDelete}
/>

{showToast && (
<Toast
message={`현재 화면 크기에서는 이용할 수 없습니다.\n태블릿 이상의 기기에서 이용해 주세요.`}
onClose={() => setShowToast(false)}
/>
)}
</div>
);
};
Expand Down
16 changes: 15 additions & 1 deletion src/pages/reviewNotes/ReviewNotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom';
import { useInfiniteScroll } from '@hooks/useInfiniteScroll';
import ReviewCard from '@components/reviewCard/ReviewCard';
import { routePath } from '@routes/routePath';
import Toast from '@components/toast/Toast';

import * as styles from './reviewNotes.css';
import { useGetReviewNotes, usePostReviewPdf } from './apis/queries';
Expand All @@ -24,7 +25,11 @@ const ReviewNotes = () => {

const { mutateAsync: createPdf } = usePostReviewPdf();
const [selectedCards, setSelectedCards] = useState<number[]>([]);
const [toasts, setToasts] = useState<string[]>([]);

const showToast = (msg: string) => {
setToasts((prev) => [...prev, msg]);
};
const toggleSelectCard = (id: number) => {
setSelectedCards((prev) =>
prev.includes(id) ? prev.filter((x) => x !== id) : [...prev, id],
Expand All @@ -34,9 +39,9 @@ const ReviewNotes = () => {
if (isPending) {
return <div />;
}

const downloadPdf = async () => {
if (!data || selectedCards.length === 0) {
showToast('PDF로 추출할 문제를 먼저 선택해주세요.');
return;
}

Expand Down Expand Up @@ -103,6 +108,15 @@ const ReviewNotes = () => {

return (
<div className={styles.reviewContainer}>
{toasts.map((msg, i) => (
<Toast
key={i}
message={msg}
onClose={() =>
setToasts((prev) => prev.filter((_, index) => index !== i))
}
/>
))}
<h1 className={styles.title}>오답노트</h1>
<button className={styles.pdfButton} onClick={downloadPdf}>
<IcExtract width={20} height={20} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signup/signup.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const buttonWrapper = style({
width: '100%',
maxWidth: '48rem',

padding: '0 3.6rem 1.6rem',
padding: '0 3.6rem 2.4rem',
gap: '1.2rem',
alignItems: 'center',
bottom: '0',
Expand Down
Loading