v.1.1 순서변경.

홈화면에 업데이트 내역 추가
This commit is contained in:
SR07 2025-05-28 17:06:40 +09:00
parent f0b482aea6
commit 933469f82f
3 changed files with 45 additions and 42 deletions

2
dist/index.html vendored
View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>숙제노기</title>
<script type="module" crossorigin src="/assets/index.D8OG0Kkt.js"></script>
<script type="module" crossorigin src="/assets/index.B5twrJS6.js"></script>
</head>
<body>
<div id="root"></div>

View File

@ -1,4 +1,5 @@
import { Box, Card, CardContent, Typography, Container, Grid } from '@mui/material'
import { Box, Card, CardContent, Typography, Container } from '@mui/material'
import { Grid } from '@mui/material'
import { useEffect, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import api from '../lib/api'
@ -40,47 +41,49 @@ function SortableCharacterCard({ character }: { character: Character }) {
}
return (
<Grid item xs={12} sm={6} md={4} ref={setNodeRef} style={style}>
<Card
sx={{
cursor: 'pointer',
textDecoration: 'none',
position: 'relative',
}}
onClick={() => navigate(`/characters/${character.id}/edit`)}
>
{/* 드래그 핸들 */}
<Box
{...attributes}
{...listeners}
<Grid item xs={12} sm={6} md={4} {...({} as any)}>
<Box ref={setNodeRef} style={style}>
<Card
sx={{
position: 'absolute',
top: 8,
right: 8,
width: 24,
height: 24,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0.1)',
borderRadius: '50%',
cursor: 'grab',
zIndex: 10,
cursor: 'pointer',
textDecoration: 'none',
position: 'relative',
}}
onClick={(e) => e.stopPropagation()}
onClick={() => navigate(`/characters/${character.id}/edit`)}
>
<DragIndicatorIcon fontSize="small" />
</Box>
{/* 드래그 핸들 */}
<Box
{...attributes}
{...listeners}
sx={{
position: 'absolute',
top: 8,
right: 8,
width: 24,
height: 24,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0.1)',
borderRadius: '50%',
cursor: 'grab',
zIndex: 10,
}}
onClick={(e) => e.stopPropagation()}
>
<DragIndicatorIcon fontSize="small" />
</Box>
<CardContent>
<Typography variant="h6">{character.name}</Typography>
<Typography color="text.secondary">: {character.server || '-'}</Typography>
<Typography color="text.secondary">: {character.job || '-'}</Typography>
<Typography color="text.secondary">
: {character.combat_power?.toLocaleString() || '-'}
</Typography>
</CardContent>
</Card>
<CardContent>
<Typography variant="h6">{character.name}</Typography>
<Typography color="text.secondary">: {character.server || '-'}</Typography>
<Typography color="text.secondary">: {character.job || '-'}</Typography>
<Typography color="text.secondary">
: {character.combat_power?.toLocaleString() || '-'}
</Typography>
</CardContent>
</Card>
</Box>
</Grid>
)
}
@ -122,7 +125,7 @@ export default function CharacterList() {
{characters.map((char) => (
<SortableCharacterCard key={char.id} character={char} />
))}
<Grid component="div" item xs={12} sm={6} md={4}>
<Grid item xs={12} sm={6} md={4} {...({} as any)}>
<Card
onClick={() => (window.location.href = '/characters/register')}
sx={{

View File

@ -43,7 +43,7 @@ function SortableHomeworkCard({ homework }: { homework: HomeworkType }) {
}
return (
<Grid component="div" item xs={12} sm={6} md={4} ref={setNodeRef} style={style}>
<Grid item xs={12} sm={6} md={4} ref={setNodeRef} style={style} {...({} as any)}>
<Card
sx={{
cursor: 'pointer',
@ -120,7 +120,7 @@ export default function HomeworkList() {
{homeworks.map((hw) => (
<SortableHomeworkCard key={hw.id} homework={hw} />
))}
<Grid item xs={12} sm={6} md={4}>
<Grid item xs={12} sm={6} md={4} {...({} as any)}>
<Card
onClick={() => (window.location.href = '/homeworks/register')}
sx={{