Skip to content

Commit

Permalink
feat: remove social button when no link (#1957)
Browse files Browse the repository at this point in the history
* feat: remove social button when no link

* fix: use socialChat instead discordURL

* fix: remove unused discordURL
  • Loading branch information
pugakn authored Jan 25, 2023
1 parent 2216129 commit a7d1931
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/components/dashboard/support-widget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
props: {
documentationURL: String,
discordURL: String
socialChat: String
},
methods: {
Expand All @@ -27,9 +27,9 @@ widget(title="Need support?")
.h-b2.q-mt-md Please read our Documentation for more info. If you are stuck with a problem you can also reach out to us on discord in the "dao-support" channel.
.row.justify-between.flex.items-center.q-mb-sm
.col-auto
q-btn.q-mt-md.q-px-sm.text-white(noCaps rounded color="primary" @click="openLink(documentationURL)") Documentation
.col
q-btn.q-mt-md.q-ml-sm.discord-buttom(unelevated rounded color="primary" icon="fab fa-discord" size="0.7rem" @click="openLink(discordURL)")
q-btn.q-mt-md.q-px-sm.text-white(noCaps rounded color="primary" @click="openLink(documentationURL || 'https://help.hypha.earth/hc/2431449449')") Documentation
.col(v-if="socialChat")
q-btn.q-mt-md.q-ml-sm.discord-buttom(unelevated rounded color="primary" icon="fab fa-discord" size="0.7rem" @click="openLink(socialChat)")
</template>

<style lang="stylus" scoped>
Expand Down
1 change: 0 additions & 1 deletion src/graphql/subscription/dao-active.subscription.gql
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ subscription activeDao($regexp: String!) {
settings_exploreParagraph_s

settings_documentationURL_s
settings_discordURL_s
}
}
}
6 changes: 3 additions & 3 deletions src/pages/dho/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ q-page.page-home
metric-link.col(:amount="activeMembersCount" title="Active members" link="members")
.row.full-width.q-gutter-x-md
how-it-works.col
support-widget.col(:documentationURL="daoSettings.documentationURL" :discordURL="daoSettings.discordURL")
support-widget.col(:documentationURL="daoSettings.documentationURL" :socialChat="daoSettings.socialChat")
.col-3.q-ml-md
new-members(:members="newMembers")

Expand All @@ -239,7 +239,7 @@ q-page.page-home
.row.q-gutter-y-md.q-ml-xs
metric-link(:amount="activeProposalsCount" link="proposals" title="New Proposals" ).full-height.full-width
metric-link(:amount="activeMembersCount" link="members" title="Active Members").full-height.full-width
support-widget(:documentationURL="daoSettings.documentationURL" :discordURL="daoSettings.discordURL").full-height.full-width
support-widget(:documentationURL="daoSettings.documentationURL" :socialChat="daoSettings.socialChat").full-height.full-width
.col-12.q-mt-md
how-it-works.full-height

Expand All @@ -259,7 +259,7 @@ q-page.page-home
.row.q-mt-md
how-it-works.full-width
.row.q-mt-md
support-widget.full-width(:documentationURL="daoSettings.documentationURL" :discordURL="daoSettings.discordURL")
support-widget.full-width(:documentationURL="daoSettings.documentationURL" :socialChat="daoSettings.socialChat")
</template>

<style lang="stylus" scoped>
Expand Down
1 change: 0 additions & 1 deletion src/query/dao-active.gql
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ query activeDao($regexp: String!) {
settings_exploreParagraph_s

settings_documentationURL_s
settings_discordURL_s
}

memberAggregate {
Expand Down
1 change: 0 additions & 1 deletion src/query/dao-created.gql
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ query activeDao($regexp: String!) {
settings_exploreTitle_s
settings_exploreParagraph_s

settings_discordURL_s
settings_documentationURL_s
}

Expand Down
1 change: 0 additions & 1 deletion src/store/dao/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const switchDao = (state, daos) => {
voiceTokenDecimals: settings?.settings_voiceToken_a.split(' ')[0].split('.')[1].length,

documentationURL: settings?.settings_documentationURL_s,
discordURL: settings?.settings_discordURL_s,

socialChat: settings?.settings_socialChat_s,
url: settings.settings_daoUrl_s,
Expand Down

0 comments on commit a7d1931

Please sign in to comment.