improving UX for the onboarding experience

This commit is contained in:
Vladyslav Matsiiako
2023-05-15 16:33:11 -07:00
parent d32c5fb869
commit 89a89af4e6
8 changed files with 28 additions and 19 deletions
+7 -4
View File
@@ -102,6 +102,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
const orgUserProjects = await getOrganizationUserProjects({
orgId: tempLocalStorage('orgData.id')
});
console.log(555, tempLocalStorage('orgData.id'), orgUserProjects)
const userWorkspaces = orgUserProjects;
if (
(userWorkspaces.length === 0 &&
@@ -248,7 +249,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
<aside className="w-full border-r border-mineshaft-600 bg-gradient-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60">
<nav className="items-between flex h-full flex-col justify-between">
<div>
{currentWorkspace ? (
{currentWorkspace && router.asPath !== "/noprojects" ? (
<div className="mt-3 mb-4 w-full p-4">
<p className="ml-1.5 mb-1 text-xs font-semibold uppercase text-gray-400">
Project
@@ -298,9 +299,11 @@ export const AppLayout = ({ children }: LayoutProps) => {
) : (
<div className="mt-3 mb-4 w-full p-4">
<Button
className="w-full bg-mineshaft-500 py-2 text-bunker-200 hover:bg-primary/90 hover:text-black"
color="mineshaft"
className="border-mineshaft-500"
colorSchema="primary"
variant="outline_bg"
size="sm"
isFullWidth
onClick={() => {
if (isAddingProjectsAllowed) {
handlePopUpOpen('addNewWs')
@@ -314,7 +317,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
</Button>
</div>
)}
<div className={`${currentWorkspace ? 'block' : 'hidden'}`}>
<div className={`${currentWorkspace && router.asPath !== "/noprojects" ? 'block' : 'hidden'}`}>
<Menu>
<Link href={`/dashboard/${currentWorkspace?._id}`} passHref>
<a>