Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 2 additions & 13 deletions Mine/src/components/settings/SettingsModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useRef, useState } from 'react'
import ProfileSettings from './ProfileSettings'
import ScreenSettings from './ScreenSettings'
import InterestSettings from './InterestSettings'

import X from '../../icon/X.svg?react'
Expand All @@ -15,7 +14,7 @@ interface SettingsProps {
}

export default function SettingsModal({ onClose }: SettingsProps) {
const [activeTab, setActiveTab] = useState<'profile' | 'interest' | 'screen'>('profile')
const [activeTab, setActiveTab] = useState<'profile' | 'interest'>('profile')
const [editMode, setEditMode] = useState(false)
const [showLogoutToast, setShowLogoutToast] = useState(false)
const [showSaveToast, setShowSaveToast] = useState(false)
Expand Down Expand Up @@ -88,15 +87,6 @@ export default function SettingsModal({ onClose }: SettingsProps) {
>
관심사 설정
</button>
<button
onClick={() => {
setActiveTab('screen')
setEditMode(false)
}}
className={`text-left transition-all ${activeTab === 'screen' ? 'text-[20px] text-white font-semibold20' : 'text-[16px] text-white/50'}`}
>
화면 설정
</button>
</div>

<div className="flex-1 py-14 pr-10 overflow-hidden">
Expand All @@ -112,7 +102,6 @@ export default function SettingsModal({ onClose }: SettingsProps) {
{activeTab === 'interest' && (
<InterestSettings interests={selectedInterests} onChange={setSelectedInterests} />
)}
{activeTab === 'screen' && <ScreenSettings />}
</div>

{activeTab === 'profile' && (
Expand Down Expand Up @@ -168,4 +157,4 @@ export default function SettingsModal({ onClose }: SettingsProps) {
</div>
</div>
)
}
}
2 changes: 1 addition & 1 deletion Mine/src/icon/wand_stars.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 29 additions & 1 deletion Mine/src/pages/magazine/components/SectionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import SectionIndexList from './SectionIndexList'
import ParagraphPart from './ParagraphPart'
import useSidebarStore from '../../../stores/sidebar'
import { useNavigate } from 'react-router-dom'
import { useState } from 'react'
import IconWandStars from '../../../icon/wand_stars.svg?react'
import ScreenSettings from '../../../components/settings/ScreenSettings'

interface SectionContentProps {
sectionId: number
Expand All @@ -18,10 +21,12 @@ export default function SectionContent({ sectionId, magazineId }: SectionContent
const { data, isLoading } = useGetSectionDetail(Number(magazineId), Number(sectionId))
const user = magazinedata?.user
const content = data?.paragraphs
const [isScreenSettingsOpen, setIsScreenSettingsOpen] = useState(false)

const handleClick = (magazineId: number) => {
navigate(`/magazine/${magazineId}`)
}

if (isLoading) {
return <></>
}
Expand Down Expand Up @@ -53,7 +58,30 @@ export default function SectionContent({ sectionId, magazineId }: SectionContent
/>
))}
</div>

{/* 우측 하단 무드보드 아이콘 버튼 */}
<button
onClick={() => setIsScreenSettingsOpen(true)}
className="fixed bottom-4 right-4 z-50 transition-all duration-200 text-gray-100-op40 hover:text-gray-100"
>
<IconWandStars className="w-6 h-6 **:fill-current" />
</button>
</div>

{/* 화면 설정 모달 */}
{isScreenSettingsOpen && (
<div
className="fixed inset-0 bg-black/40 flex items-center justify-center z-999"
onClick={() => setIsScreenSettingsOpen(false)}
>
<div
className="relative bg-gray-600-op70 rounded-2xl p-10 shadow-[0px_4px_4px_rgba(0,0,0,0.25)]"
onClick={(e) => e.stopPropagation()}
>
<ScreenSettings />
</div>
</div>
)}
</div>
)
}
}
Loading