Skip to content

Commit ad62c80

Browse files
committed
improvement(workspaces): firname's workspace instead of fn ln's workspace
1 parent f5809eb commit ad62c80

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

apps/sim/app/api/workspaces/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export async function POST(req: Request) {
7777

7878
// Helper function to create a default workspace
7979
async function createDefaultWorkspace(userId: string, userName?: string | null) {
80-
const workspaceName = userName ? `${userName}'s Workspace` : 'My Workspace'
80+
// Extract first name only by splitting on spaces and taking the first part
81+
const firstName = userName?.split(' ')[0] || null
82+
const workspaceName = firstName ? `${firstName}'s Workspace` : 'My Workspace'
8183
return createWorkspace(userId, workspaceName)
8284
}
8385

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar-new.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,28 +125,17 @@ export function SidebarNew() {
125125
</div>
126126
{/* Collapse/Expand */}
127127
<div className='flex items-center gap-[14px]'>
128+
{/* TODO: Add sidebar collapse */}
128129
<button type='button' aria-label='Collapse sidebar' className='group -m-1 p-1'>
129130
<ChevronDown className='h-[8px] w-[12px] text-[#787878] transition-colors dark:text-[#787878] dark:group-hover:text-[#E6E6E6]' />
130131
</button>
132+
{/* TODO: Add panel toggle */}
131133
<button type='button' aria-label='Collapse sidebar' className='group'>
132134
<PanelLeft className='h-[17.5px] w-[17.5px] text-[#787878] transition-colors dark:text-[#787878] dark:group-hover:text-[#E6E6E6]' />
133135
</button>
134136
</div>
135137
</div>
136138

137-
{/* Add */}
138-
{/* <div className='mt-[14px] flex items-center'>
139-
<Button
140-
variant='3d'
141-
className='w-full gap-[12px] rounded-[8px] py-[5px] text-small'
142-
onClick={() => handleCreateWorkflow()}
143-
disabled={isCreatingWorkflow}
144-
>
145-
<Plus className='h-[14px] w-[14px]' />
146-
Add Workflow
147-
</Button>
148-
</div> */}
149-
150139
{/* Search */}
151140
<div className='mx-[8px] mt-[14px] flex flex-shrink-0 cursor-pointer items-center justify-between rounded-[8px] bg-[#272727] px-[6px] py-[7px] dark:bg-[#272727]'>
152141
<div className='flex items-center gap-[6px]'>

0 commit comments

Comments
 (0)