Skip to content

Commit

Permalink
[feat] インポートの調整とリファクタリング
Browse files Browse the repository at this point in the history
  • Loading branch information
TkymHrt committed Nov 15, 2024
1 parent 3068c86 commit 2651daa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/src/app/user/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const UserPage = () => {
const [myScore, setMyScore] = useState<MyScoreDetail[]>([]);
const [isEditing, setIsEditing] = useState(false);
const [isOpen, setIsOpen] = useStatusChangeDialog();
const handleOpenDialog = () => setIsOpen(true);

useEffect(() => {
const fetchData = async () => {
Expand Down Expand Up @@ -49,7 +48,7 @@ const UserPage = () => {
if (!userData) return null;
return (
<div className="w-screen min-h-screen flex flex-col gap-4 items-center p-4 pt-10 bg-gradient-to-t from-gray-300 via-gray-200 to-gray-50">
{isOpen && <StatusChangeDialog />}
<StatusChangeDialog />
<div className="flex items-center mb-4">
{userData.photoURL ? (
<img
Expand Down Expand Up @@ -112,9 +111,11 @@ const UserPage = () => {
<p className="text-xs text-muted-foreground">最高点</p>
</Card>
</div>
<button type="button" onClick={() => handleOpenDialog()}>
<StatusList speedPoint={10} similarityPoint={40} />
</button>
<StatusList
speedPoint={10}
similarityPoint={40}
onClick={() => setIsOpen(true)}
/>
<Card className="flex flex-col items-center border-none p-8">
<h2 className="text-2xl font-bold mb-4">過去のチャレンジ</h2>
{myScore.length === 0 ? (
Expand Down

0 comments on commit 2651daa

Please sign in to comment.