Skip to content

Commit

Permalink
update editor
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Aug 21, 2024
1 parent a759cab commit b09f782
Show file tree
Hide file tree
Showing 5 changed files with 300 additions and 308 deletions.
9 changes: 0 additions & 9 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
],
"~/*": [
"./node_modules/*"
],
"paper-interview": [
"./prototypr-packages/paper-interview/src"
],
"react-kofi": [
"./prototypr-packages/react-kofi/src"
],
"tiptypr": [
"./prototypr-packages/tiptypr/src"
]
}
}
Expand Down
6 changes: 2 additions & 4 deletions lib/editor/typrNotesProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ export const typrNotesProps = ({ user, userLoading, mutateUser, router }) => ({
logo: { show:false,image: `/static/images/logo-small.svg`, url: "/" },
userBadge: {
show:false,
avatarPlaceholder:
"https://prototypr-media.sfo2.digitaloceanspaces.com/strapi/4f9713374ad556ff3b8ca33e241f6c43.png?updated_at=2022-12-14T10:55:38.818Z",
// loggedInMenu
},
position: "sticky",
},
userMenu: {
avatarPlaceholder:
"https://prototypr-media.sfo2.digitaloceanspaces.com/strapi/4f9713374ad556ff3b8ca33e241f6c43.png?updated_at=2022-12-14T10:55:38.818Z",
},
settingsPanel: {
featuredImage: {
show:true
Expand Down
24 changes: 13 additions & 11 deletions lib/editor/typrProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ export const typrProps = ({ user, userLoading, mutateUser, router }) => ({
nav: {
logo: { image: `/static/images/logo-small.svg`, url: "/" },
userBadge: {
loggedInMenu
}
},
userMenu: {
avatarPlaceholder:
"https://prototypr-media.sfo2.digitaloceanspaces.com/strapi/4f9713374ad556ff3b8ca33e241f6c43.png?updated_at=2022-12-14T10:55:38.818Z",
loggedInMenu,
avatarPlaceholder:
"https://prototypr-media.sfo2.digitaloceanspaces.com/strapi/4f9713374ad556ff3b8ca33e241f6c43.png"
},
},
settingsPanel: {
featuredImage: {
show:true
show: true,
},
},
},
Expand All @@ -43,7 +41,11 @@ export const typrProps = ({ user, userLoading, mutateUser, router }) => ({
},
postOperations: {
load: async ({ postId, user }) => {
const postObject = await getUserArticle({user, id:postId, type: "article"});
const postObject = await getUserArticle({
user,
id: postId,
type: "article",
});
return postObject;
},
save: async ({ entry, postId }) => {
Expand All @@ -55,13 +57,13 @@ export const typrProps = ({ user, userLoading, mutateUser, router }) => ({
return postObject;
},
},
mediaHandler:{
mediaHandler: {
config: {
method: "post",
url: `${process.env.NEXT_PUBLIC_API_URL}/api/users-permissions/users/article/image/upload`,
headers: {
Authorization: `Bearer ${user?.jwt}`,
}
},
},
},
hooks: {
Expand All @@ -78,6 +80,6 @@ export const typrProps = ({ user, userLoading, mutateUser, router }) => ({
},
},
router: {
push: router.push
push: router.push,
},
});
Loading

0 comments on commit b09f782

Please sign in to comment.