mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-01 08:34:07 +00:00
chore: fixed indentation
This commit is contained in:
@@ -10,7 +10,7 @@ const WorkspaceSelector = () => {
|
||||
const dropdownTippyRef = useRef();
|
||||
const [openWorkspacesModal, setOpenWorkspacesModal] = useState(false);
|
||||
const [activeWorkspace, setActiveWorkspace] = useState({});
|
||||
const dispatch = useDispatch();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const { workspaces, activeWorkspaceUid } = useSelector((state) => state.workspaces);
|
||||
|
||||
@@ -21,14 +21,14 @@ const WorkspaceSelector = () => {
|
||||
const Icon = forwardRef((props, ref) => {
|
||||
return (
|
||||
<div ref={ref} className="current-workspace flex justify-between items-center pl-2 pr-2 py-1 select-none">
|
||||
<div className='flex items-center'>
|
||||
<span className='mr-2'>
|
||||
<IconBox size={18} strokeWidth={1.5}/>
|
||||
</span>
|
||||
<span>
|
||||
{activeWorkspace.name}
|
||||
</span>
|
||||
</div>
|
||||
<div className='flex items-center'>
|
||||
<span className='mr-2'>
|
||||
<IconBox size={18} strokeWidth={1.5}/>
|
||||
</span>
|
||||
<span>
|
||||
{activeWorkspace.name}
|
||||
</span>
|
||||
</div>
|
||||
<IconCaretDown className="caret" size={14} strokeWidth={2}/>
|
||||
</div>
|
||||
);
|
||||
@@ -36,19 +36,19 @@ const WorkspaceSelector = () => {
|
||||
|
||||
const onDropdownCreate = (ref) => dropdownTippyRef.current = ref;
|
||||
|
||||
const handleSelectWorkspace = (workspace) => {
|
||||
dispatch(selectWorkspace(workspace));
|
||||
}
|
||||
const handleSelectWorkspace = (workspace) => {
|
||||
dispatch(selectWorkspace(workspace));
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledWrapper>
|
||||
<div className="items-center cursor-pointer">
|
||||
<Dropdown onCreate={onDropdownCreate} icon={<Icon />} placement='bottom-end'>
|
||||
{workspaces && workspaces.length && workspaces.map((workspace) => (
|
||||
<div className="dropdown-item" onClick={() => handleSelectWorkspace(workspace)}>
|
||||
<span>{workspace.name}</span>
|
||||
</div>
|
||||
))}
|
||||
{workspaces && workspaces.length && workspaces.map((workspace) => (
|
||||
<div className="dropdown-item" onClick={() => handleSelectWorkspace(workspace)}>
|
||||
<span>{workspace.name}</span>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div className="dropdown-item" style={{borderTop: 'solid 1px #e7e7e7'}} onClick={() => {
|
||||
setOpenWorkspacesModal(true);
|
||||
|
||||
Reference in New Issue
Block a user