chore: rename getArticlesMeta to useArticleMeta

This commit is contained in:
Sajad Hashemian 2022-02-27 18:15:40 +03:30
parent 242f91337e
commit 2ed6d6cf9c
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ import { useRoute } from 'vue-router'
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
export function useArticles () {
const { articlesType, tag, username, metaChanged } = getArticlesMeta()
const { articlesType, tag, username, metaChanged } = useArticlesMeta()
const articles = ref<Article[]>([])
const articlesCount = ref(0)
@ -87,13 +87,13 @@ const routeNameToArticlesType: Partial<Record<AppRouteNames, ArticlesType>> = ({
'profile-favorites': 'user-favorites-feed',
})
interface GetArticlesMetaReturn {
interface UseArticlesMetaReturn {
tag: ComputedRef<string>
username: ComputedRef<string>
articlesType: ComputedRef<ArticlesType>
metaChanged: ComputedRef<string>
}
function getArticlesMeta (): GetArticlesMetaReturn {
function useArticlesMeta (): UseArticlesMetaReturn {
const route = useRoute()
const tag = ref('')