aboutsummaryrefslogtreecommitdiff
path: root/src/hocs/with_subscription
diff options
context:
space:
mode:
authorIlja <ilja@ilja.space>2022-07-18 12:33:03 +0200
committerIlja <ilja@ilja.space>2022-07-18 12:42:40 +0200
commit18d69f93d38dc15a74db81ee4c10b4766bebfc35 (patch)
tree56763764de2ef984f498d3507c6ebead3099c57d /src/hocs/with_subscription
parente594252668256197d9b68f1db1f7108c5255d275 (diff)
parent9ddb43296f3fbb6621e646a20e86e05b6c730ad2 (diff)
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into feat/report-notification
Diffstat (limited to 'src/hocs/with_subscription')
-rw-r--r--src/hocs/with_subscription/with_subscription.jsx (renamed from src/hocs/with_subscription/with_subscription.js)19
-rw-r--r--src/hocs/with_subscription/with_subscription.scss2
2 files changed, 9 insertions, 12 deletions
diff --git a/src/hocs/with_subscription/with_subscription.js b/src/hocs/with_subscription/with_subscription.jsx
index b1244276..d3f5506a 100644
--- a/src/hocs/with_subscription/with_subscription.js
+++ b/src/hocs/with_subscription/with_subscription.jsx
@@ -1,4 +1,5 @@
-import Vue from 'vue'
+// eslint-disable-next-line no-unused
+import { h } from 'vue'
import isEmpty from 'lodash/isEmpty'
import { getComponentProps } from '../../services/component_utils/component_utils'
import './with_subscription.scss'
@@ -22,7 +23,7 @@ const withSubscription = ({
const originalProps = Object.keys(getComponentProps(WrappedComponent))
const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
- return Vue.component('withSubscription', {
+ return {
props: [
...props,
'refresh' // boolean saying to force-fetch data whenever created
@@ -59,17 +60,13 @@ const withSubscription = ({
}
}
},
- render (h) {
+ render () {
if (!this.error && !this.loading) {
const props = {
- props: {
- ...this.$props,
- [childPropName]: this.fetchedData
- },
- on: this.$listeners,
- scopedSlots: this.$scopedSlots
+ ...this.$props,
+ [childPropName]: this.fetchedData
}
- const children = Object.entries(this.$slots).map(([key, value]) => h('template', { slot: key }, value))
+ const children = this.$slots
return (
<div class="with-subscription">
<WrappedComponent {...props}>
@@ -88,7 +85,7 @@ const withSubscription = ({
)
}
}
- })
+ }
}
export default withSubscription
diff --git a/src/hocs/with_subscription/with_subscription.scss b/src/hocs/with_subscription/with_subscription.scss
index 52c7d94c..7fd83802 100644
--- a/src/hocs/with_subscription/with_subscription.scss
+++ b/src/hocs/with_subscription/with_subscription.scss
@@ -4,7 +4,7 @@
text-align: center;
.error {
- font-size: 14px;
+ font-size: 1rem;
}
}
} \ No newline at end of file