change: hide project heading when project name is null
This commit is contained in:
parent
e87a2ea0b7
commit
67ac88856b
@ -6,7 +6,7 @@ import UserIDContext from 'App/context';
|
||||
import { useMeQuery } from 'shared/generated/graphql';
|
||||
|
||||
type GlobalTopNavbarProps = {
|
||||
name: string;
|
||||
name: string | null;
|
||||
projectMembers?: null | Array<TaskUser>;
|
||||
onSaveProjectName?: (projectName: string) => void;
|
||||
};
|
||||
|
@ -411,7 +411,7 @@ const Project = () => {
|
||||
if (loading) {
|
||||
return (
|
||||
<>
|
||||
<GlobalTopNavbar onSaveProjectName={projectName => {}} name="Loading..." />
|
||||
<GlobalTopNavbar onSaveProjectName={projectName => {}} name="" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ const Projects = () => {
|
||||
const { projects } = data;
|
||||
return (
|
||||
<>
|
||||
<GlobalTopNavbar onSaveProjectName={() => {}} name="Projects" />
|
||||
<GlobalTopNavbar onSaveProjectName={() => {}} name={null} />
|
||||
<ProjectGrid>
|
||||
{projects.map(project => (
|
||||
<ProjectLink key={project.id} to={`/projects/${project.id}`}>
|
||||
|
@ -87,12 +87,18 @@ const ProjectHeading: React.FC<ProjectHeadingProps> = ({ projectName: initialPro
|
||||
{projectName}
|
||||
</ProjectName>
|
||||
)}
|
||||
<ProjectSettingsButton>
|
||||
<AngleDown color="#c2c6dc" />
|
||||
</ProjectSettingsButton>
|
||||
<ProjectSettingsButton>
|
||||
<Star width={16} height={16} color="#c2c6dc" />
|
||||
</ProjectSettingsButton>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
type NavBarProps = {
|
||||
projectName: string;
|
||||
projectName: string | null;
|
||||
onProfileClick: (bottom: number, right: number) => void;
|
||||
onSaveProjectName?: (projectName: string) => void;
|
||||
onNotificationClick: () => void;
|
||||
@ -141,20 +147,16 @@ const NavBar: React.FC<NavBarProps> = ({
|
||||
<ProjectActions>
|
||||
<ProjectMeta>
|
||||
<ProjectSwitcher>Projects</ProjectSwitcher>
|
||||
<ProjectHeading projectName={projectName} onSaveProjectName={onSaveProjectName} />
|
||||
<ProjectSettingsButton>
|
||||
<AngleDown color="#c2c6dc" />
|
||||
</ProjectSettingsButton>
|
||||
<ProjectSettingsButton>
|
||||
<Star width={16} height={16} color="#c2c6dc" />
|
||||
</ProjectSettingsButton>
|
||||
{projectName && <ProjectHeading projectName={projectName} onSaveProjectName={onSaveProjectName} />}
|
||||
</ProjectMeta>
|
||||
{projectName && (
|
||||
<ProjectTabs>
|
||||
<ProjectTab active>Board</ProjectTab>
|
||||
<ProjectTab>Calender</ProjectTab>
|
||||
<ProjectTab>Timeline</ProjectTab>
|
||||
<ProjectTab>Wiki</ProjectTab>
|
||||
</ProjectTabs>
|
||||
)}
|
||||
</ProjectActions>
|
||||
<GlobalActions>
|
||||
{projectMembers && (
|
||||
|
Loading…
Reference in New Issue
Block a user