React
Member
- Sep 17, 2023
- 213
- 93
Hi guys, I hope that I am in the appropriate section, going to sound like a noob as I haven't got very good experience when it comes to backend.
I am working on a fansite for my friends retro HabHub, on the /homepage I would like it to function automatically so that it would pull and update the information in real-time.
Could the "Event Schedule" area work with Discord, like pull the required information from the events channel in the Discord Server?
Also, for the "HabHub News" area I have a JavaScript script that you show a different "article" automatically, every 60 seconds, however nothing happens.
This is the code, however as I said, I am inexperienced & I don't want to be spoonfed anything, that won't help me. Suggestions/Ideas would be greatly appreciated, helping me to complete what I would like to do.
Don't comment if you're going to bring hate, I understand I have possibly approached this completely the wrong way, I am trying to learn.
Thanks in advance!
I am working on a fansite for my friends retro HabHub, on the /homepage I would like it to function automatically so that it would pull and update the information in real-time.
You must be registered for see images attach
Could the "Event Schedule" area work with Discord, like pull the required information from the events channel in the Discord Server?
You must be registered for see images attach
Also, for the "HabHub News" area I have a JavaScript script that you show a different "article" automatically, every 60 seconds, however nothing happens.
<script>
export default {
data() {
return {
articles: [
"https://habhub.net/community/articles/welcome-to-habhub",
"https://habhub.net/community/articles/rare-release",
"https://habhub.net/community/articles/secrets-of-the-public-rooms",
"https://habhub.net/community/articles/twitterx-giveaway",
"https://habhub.net/community/articles/rare-release-2",
"https://habhub.net/community/articles/the-habhub-way",
"https://habhub.net/community/articles/the-future-of-habhub",
"https://habhub.net/community/articles/supreme-structures",
"https://habhub.net/community/articles/crazy-cats"
],
currentArticleIndex: 0
};
},
computed: {
currentArticle() {
return this.articles[this.currentArticleIndex];
}
},
methods: {
updateArticle() {
this.currentArticleIndex = (this.currentArticleIndex + 1) % this.articles.length;
}
},
mounted() {
this.updateArticle();
setInterval(this.updateArticle, 60000); // Change article every 60 seconds
}
};
</script>
This is the code, however as I said, I am inexperienced & I don't want to be spoonfed anything, that won't help me. Suggestions/Ideas would be greatly appreciated, helping me to complete what I would like to do.
Don't comment if you're going to bring hate, I understand I have possibly approached this completely the wrong way, I am trying to learn.
Thanks in advance!