From 5872afafabb928580760fe61ed093ea29429cb4d Mon Sep 17 00:00:00 2001 From: Eugene Serb <46799701+eugene-serb@users.noreply.github.com> Date: Fri, 2 Feb 2024 18:54:40 +0300 Subject: [PATCH 01/16] #100 replace links from MHeader into parent component --- src/components/molecules/MHeader.vue | 37 ++++++---------------------- src/layouts/LDefault.vue | 36 ++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/src/components/molecules/MHeader.vue b/src/components/molecules/MHeader.vue index 96fea50..46968e5 100644 --- a/src/components/molecules/MHeader.vue +++ b/src/components/molecules/MHeader.vue @@ -2,44 +2,21 @@ import { defineComponent } from 'vue'; import { ATextLogo } from '@/components/atoms'; import MHeaderMenu from '@/components/molecules/MHeaderMenu.vue'; -import { URL_TO_HOME, URL_TO_FAQ, URL_TO_ABOUT, URL_TO_DONATE, URL_TO_MOBILE } from '@/constants'; +import { URL_TO_HOME } from '@/constants'; +import type { PropType } from 'vue'; import type { Link } from '@/models'; defineComponent({ name: 'MHeader', }); -/** - * Ссылки. - */ -const links: Link[] = [ - { - text: 'Gamepad', - to: URL_TO_HOME, - target: '_self', +defineProps({ + links: { + type: Array as PropType, + default: () => [], }, - { - text: 'Mobile', - to: URL_TO_MOBILE, - target: '_self', - }, - { - text: 'FAQ', - to: URL_TO_FAQ, - target: '_self', - }, - { - text: 'About', - to: URL_TO_ABOUT, - target: '_self', - }, - { - text: 'Donate', - to: URL_TO_DONATE, - target: '_self', - }, -]; +});