Skip to content

Commit

Permalink
import response
Browse files Browse the repository at this point in the history
  • Loading branch information
mluena committed Oct 16, 2024
1 parent d32dfba commit 7b2d900
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 2 additions & 3 deletions client/src/containers/navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Navigation = (): JSX.Element => {
const sp = useSyncSearchParams();
const { data: user } = useGetUsersMe();

const userNameWithoutSpaces = user?.username?.replace(" ", "");
const userNameWithoutSpaces = !user?.username?.includes(" ");

return (
<nav className="relative z-20 flex h-full w-20 shrink-0 flex-col justify-between border-r-2 border-gray-300/20 bg-white">
Expand Down Expand Up @@ -170,8 +170,7 @@ const Navigation = (): JSX.Element => {
<span
className={cn({
"w-full flex-wrap text-xxs": true,
"overflow-hidden truncate":
userNameWithoutSpaces && userNameWithoutSpaces?.length > 15,
"overflow-hidden truncate px-2": userNameWithoutSpaces,
})}
>
{user ? user?.username : "Log in"}
Expand Down
5 changes: 3 additions & 2 deletions client/src/services/projects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ export function uploadProjectsCsv(
},
...options,
})
.then(({ data }) => {
console.info("Projects uploaded successfully:", data);
.then((response) => {
console.info("Projects uploaded successfully:", response.data);
toast.success("Projects uploaded successfully");
return response;
})
.catch((err) => {
toast.error(err.response.data.error.message);
Expand Down
6 changes: 6 additions & 0 deletions cms/config/sync/user-role.contributor.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
{
"action": "api::project-edit-suggestion.project-edit-suggestion.update"
},
{
"action": "api::project-status.project-status.find"
},
{
"action": "api::project-status.project-status.findOne"
},
{
"action": "api::project.project.find"
},
Expand Down

0 comments on commit 7b2d900

Please sign in to comment.