({ name, href })
| 169 | }; |
| 170 | |
| 171 | const SavedGraphRow: FC<SavedGraphRowProps> = ({ name, href }) => { |
| 172 | const navigate = useNavigate(); |
| 173 | const isCurrent = window.location.href.includes(href); |
| 174 | |
| 175 | return ( |
| 176 | <a |
| 177 | key={name} |
| 178 | onClick={() => navigate(href)} |
| 179 | className={clsx( |
| 180 | isCurrent ? "text-blue-500" : "text-gray-500 hover:text-gray-700", |
| 181 | "group flex h-10 cursor-pointer flex-row items-center gap-x-3 text-xs font-semibold transition-all duration-150 hover:gap-x-3.5", |
| 182 | )} |
| 183 | > |
| 184 | <div className="relative flex h-full flex-row items-center"> |
| 185 | {/* If it's the last, only display half a bar connecting upwards instead of a full bar. */} |
| 186 | <div |
| 187 | className={clsx( |
| 188 | "h-full w-[1.5px] transition-all duration-150", |
| 189 | isCurrent |
| 190 | ? "bg-gradient-to-t from-gray-300 via-blue-400 to-gray-300 " |
| 191 | : "bg-gradient-to-t from-gray-300 to-gray-300", |
| 192 | )} |
| 193 | /> |
| 194 | <div |
| 195 | className={clsx( |
| 196 | "transtion-all absolute -left-[0.2rem] h-2 w-2 rounded-full bg-white ring-[1.5px] duration-150", |
| 197 | isCurrent ? "ring-blue-500" : "ring-gray-300", |
| 198 | )} |
| 199 | /> |
| 200 | <div |
| 201 | className={clsx( |
| 202 | "absolute -left-[0.2rem] h-2 w-2 rounded-full ring-inset ring-white transition-all duration-150", |
| 203 | isCurrent |
| 204 | ? "bg-blue-400 opacity-100 ring-1" |
| 205 | : "bg-gray-300 opacity-0 ring-0 group-hover:opacity-100", |
| 206 | )} |
| 207 | /> |
| 208 | </div> |
| 209 | {name} |
| 210 | </a> |
| 211 | ); |
| 212 | }; |
| 213 | |
| 214 | interface NavbarProps { |
| 215 | userID: string; |
nothing calls this directly
no outgoing calls
no test coverage detected