|
|
@ -1,54 +1,76 @@ |
|
|
|
import { ChevronRight } from 'lucide-react'; |
|
|
|
import { ChevronRight, LogOut, Map, Plus, User2, Users2 } from 'lucide-react'; |
|
|
|
import { logout } from './navigation'; |
|
|
|
import { logout } from './navigation'; |
|
|
|
|
|
|
|
import { CreateRoadmapModal } from '../CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx'; |
|
|
|
|
|
|
|
import { useState } from 'react'; |
|
|
|
|
|
|
|
|
|
|
|
type AccountDropdownListProps = { |
|
|
|
type AccountDropdownListProps = { |
|
|
|
|
|
|
|
onCreateRoadmap: () => void; |
|
|
|
setIsTeamsOpen: (isOpen: boolean) => void; |
|
|
|
setIsTeamsOpen: (isOpen: boolean) => void; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export function AccountDropdownList(props: AccountDropdownListProps) { |
|
|
|
export function AccountDropdownList(props: AccountDropdownListProps) { |
|
|
|
const { setIsTeamsOpen } = props; |
|
|
|
const { setIsTeamsOpen, onCreateRoadmap } = props; |
|
|
|
|
|
|
|
const [isCreatingRoadmap, setIsCreatingRoadmap] = useState(false); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<ul> |
|
|
|
<ul> |
|
|
|
<li className="px-1"> |
|
|
|
<li className="px-1"> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href="/account" |
|
|
|
href="/account" |
|
|
|
className="block rounded pl-4 pr-2 py-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="group flex items-center gap-2 rounded py-2 pl-3 pr-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<User2 className="h-4 w-4 stroke-[2.5px] text-slate-400 group-hover:text-white" /> |
|
|
|
Profile |
|
|
|
Profile |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li className="px-1"> |
|
|
|
<li className="px-1"> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href="/account/friends" |
|
|
|
href="/account/friends" |
|
|
|
className="block rounded pl-4 pr-2 py-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="group flex items-center gap-2 rounded py-2 pl-3 pr-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<Users2 className="h-4 w-4 stroke-[2px] text-slate-400 group-hover:text-white" /> |
|
|
|
Friends |
|
|
|
Friends |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li className="px-1"> |
|
|
|
<li className="mt-1 border-t border-t-gray-700/60 px-1 pt-1"> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
onCreateRoadmap(); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
className="group flex w-full items-center gap-2 rounded py-2 pl-3 pr-2 text-left text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Plus className="h-4 w-4 stroke-[2px] text-slate-400 group-hover:text-white" /> |
|
|
|
|
|
|
|
New Roadmap |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li className="border-b border-b-gray-700/60 px-1 pb-1"> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href="/account/roadmaps" |
|
|
|
href="/account/roadmaps" |
|
|
|
className="block rounded pl-4 pr-2 py-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="group flex items-center gap-2 rounded py-2 pl-3 pr-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<Map className="h-4 w-4 stroke-[2px] text-slate-400 group-hover:text-white" /> |
|
|
|
Roadmaps |
|
|
|
Roadmaps |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li className="px-1"> |
|
|
|
<li className="px-1 pt-1"> |
|
|
|
<button |
|
|
|
<button |
|
|
|
className="group flex w-full items-center justify-between rounded pl-4 pr-2 py-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="group flex w-full items-center justify-between rounded py-2 pl-3 pr-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
onClick={() => setIsTeamsOpen(true)} |
|
|
|
onClick={() => setIsTeamsOpen(true)} |
|
|
|
> |
|
|
|
> |
|
|
|
Teams |
|
|
|
<span className="flex items-center gap-2.5"> |
|
|
|
|
|
|
|
<Users2 className="h-4 w-4 stroke-[2px] text-slate-400 group-hover:text-white" /> |
|
|
|
|
|
|
|
Teams |
|
|
|
|
|
|
|
</span> |
|
|
|
<ChevronRight className="h-4 w-4 shrink-0 stroke-[2.5px] text-slate-400 group-hover:text-white" /> |
|
|
|
<ChevronRight className="h-4 w-4 shrink-0 stroke-[2.5px] text-slate-400 group-hover:text-white" /> |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li className="px-1"> |
|
|
|
<li className="px-1"> |
|
|
|
<button |
|
|
|
<button |
|
|
|
className="block w-full rounded pl-4 pr-2 py-2 text-left text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="group flex gap-2 items-center w-full rounded py-2 pl-3 pr-2 text-left text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
type="button" |
|
|
|
type="button" |
|
|
|
onClick={logout} |
|
|
|
onClick={logout} |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<LogOut className="h-4 w-4 stroke-[2px] text-slate-400 group-hover:text-white" /> |
|
|
|
Logout |
|
|
|
Logout |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|