Skip to content

Commit

Permalink
React on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAndBear committed Nov 8, 2023
1 parent dc1a819 commit 9cf37c4
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ export default defineComponent({
const previewService = usePreviewService()
const preview = ref(undefined)
const matchingSpace = computed(() => {
return getMatchingSpace(unref(resource))
})
const loadData = async () => {
const calls = []
if (unref(resource).type === 'file' && !unref(isPublicLinkContext)) {
Expand Down Expand Up @@ -211,6 +207,12 @@ export default defineComponent({
ShareTypes.containsAnyValue(ShareTypes.authenticated, a.shareTypes)
)
})
const sharedAncestorRoute = computed(() => {
return getSharedAncestorRoute({
sharedAncestor: unref(sharedAncestor),
matchingSpace: unref(space) || getMatchingSpace(unref(resource))
})
})
const formatDateRelative = (date) => {
return formatRelativeDateFromJSDate(new Date(date), language.current)
}
Expand Down Expand Up @@ -240,8 +242,8 @@ export default defineComponent({
isPreviewLoading,
ancestorMetaData,
sharedAncestor,
sharedAncestorRoute,
formatDateRelative,
matchingSpace,
contextualHelper
}
},
Expand Down Expand Up @@ -271,12 +273,6 @@ export default defineComponent({
showSharedVia() {
return this.showShares && this.sharedAncestor
},
sharedAncestorRoute() {
return getSharedAncestorRoute({
sharedAncestor: this.sharedAncestor,
matchingSpace: this.space || this.matchingSpace
})
},
showShares() {
if (this.isPublicLinkContext) {
return false
Expand Down

0 comments on commit 9cf37c4

Please sign in to comment.