Skip to content

Commit

Permalink
update default images
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoni committed Nov 14, 2023
1 parent 4f9f1ec commit 6ceb143
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function UserProfile() {
return (
<div className='w-full flex flex-col justify-center items-center font-acumin gap-y-2 text-white pb-6 pt-10'>
<div className='relative w-24 h-24 rounded-full overflow-hidden'>
<Image src={`${data?.userdetails?.imageUrl ? data?.userdetails?.imageUrl : '/images/placeholders/user/defaultprofile.png'}`} fill alt='' />
<Image src={`${data?.userdetails?.imageUrl ? data?.userdetails?.imageUrl : '/images/placeholders/user/userdefault.png'}`} fill alt='' />
</div>
<div className='text-[1.438rem] leading-[1.725rem] font-semibold '>{data?.userdetails?.name}</div>
<div className='font-normal text-base '>{data?.userdetails?.isSysAdmin ? "System Admin" : "Member"}</div>
Expand Down
2 changes: 1 addition & 1 deletion deployment/frontend/src/schema/ckan.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ export interface GroupTree {
name: string;
highlighted: boolean;
children: GroupTree[];
image_display_url?: string;
image_display_url: string;
}
4 changes: 2 additions & 2 deletions deployment/frontend/src/server/api/routers/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const UserRouter = createTRPCRouter({
id: user.id!,
description: user?.email,
orgnumber: userTemp?.length,
image_display_url: user?.image_url,
image_display_url: user?.image_url ? user?.image_url : '/images/placeholders/user/userdefault.png',
orgs: userOrgDetails
})
}
Expand All @@ -97,7 +97,7 @@ export const UserRouter = createTRPCRouter({
id: user.id!,
description: user?.email,
orgnumber: 0,
image_display_url: user?.image_url,
image_display_url: user?.image_url ? user?.image_url : '/images/placeholders/user/userdefault.png',
orgs: []
})
}
Expand Down
4 changes: 2 additions & 2 deletions deployment/frontend/src/server/api/routers/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export const OrganizationRouter = createTRPCRouter({
return {
title: orgTitle,
name: orgName,
image_display_url: orgImage,
image_display_url: orgImage ? orgImage : '/images/placeholders/teams/teamdefault.png',
description: `${userCount} Member(s) | ${packageCount} Datasets`
}
}));

type IOrg = {
title: string | undefined;
name: string | undefined;
image_display_url: string | undefined;
image_display_url: string;
description: string;
}
let result = org;
Expand Down
6 changes: 3 additions & 3 deletions deployment/frontend/src/server/api/routers/topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ export const TopicRouter = createTRPCRouter({
})
const rgroup = {
...group,
image_display_url: groupDetails?.image_display_url,
image_display_url: groupDetails?.image_display_url ? groupDetails?.image_display_url : '/images/placeholders/topics/topicsdefault.png',
}
rgroup.children.map(async (child) => {
const childDetails = await getGroup({
apiKey: ctx.session.user.apikey,
id: child.id,
})
child.image_display_url =
childDetails?.image_display_url
childDetails?.image_display_url ? childDetails?.image_display_url : '/images/placeholders/topics/topicsdefault.png'
return child
})
return group
return rgroup
})
)
let result = groupDetails
Expand Down

0 comments on commit 6ceb143

Please sign in to comment.