({ tab }: Props)
| 17 | * - Engine icon / unlink glyph via SheetConnectionIcon. |
| 18 | */ |
| 19 | export function Prefix({ tab }: Props) { |
| 20 | const { isWorksheetCreator } = useSheetContext(); |
| 21 | |
| 22 | const isDraft = !tab.worksheet && tab.viewState.view === "CODE"; |
| 23 | |
| 24 | const sheet = useAppStore((s) => |
| 25 | tab.worksheet ? s.getWorksheetByName(tab.worksheet) : null |
| 26 | ); |
| 27 | |
| 28 | return ( |
| 29 | <div className="opacity-80 flex items-center gap-x-2"> |
| 30 | {isDraft ? ( |
| 31 | <PencilLine className="size-4" /> |
| 32 | ) : ( |
| 33 | <> |
| 34 | {sheet && !isWorksheetCreator(sheet) && <Users className="size-4" />} |
| 35 | {tab.mode === "ADMIN" && <Wrench className="size-4" />} |
| 36 | </> |
| 37 | )} |
| 38 | <SheetConnectionIcon tab={tab} /> |
| 39 | </div> |
| 40 | ); |
| 41 | } |
nothing calls this directly
no test coverage detected