From 6c99ff9b38b7a3fdc4ee3e85918ed0a731011ba8 Mon Sep 17 00:00:00 2001 From: Noah Hernandez <63211322+oahnh@users.noreply.github.com> Date: Thu, 11 Jan 2024 00:38:51 -0800 Subject: [PATCH] fix(types): moves question type definition to FAQDropdown component --- src/components/FAQ.astro | 6 +----- src/components/FAQDropdown/index.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/FAQ.astro b/src/components/FAQ.astro index 986eab8..e0dd712 100644 --- a/src/components/FAQ.astro +++ b/src/components/FAQ.astro @@ -1,10 +1,6 @@ --- import FAQDropdown from '../components/FAQDropdown'; -export interface Question { - label: string; - content: string; - hyperlink?: { target: string; link: string }; -} +import type { Question } from '../components/FAQDropdown'; const faqs: Question[] = [ { diff --git a/src/components/FAQDropdown/index.tsx b/src/components/FAQDropdown/index.tsx index 60a5907..459a99c 100644 --- a/src/components/FAQDropdown/index.tsx +++ b/src/components/FAQDropdown/index.tsx @@ -1,6 +1,11 @@ import { useState } from 'react'; import styles from './style.module.scss'; -import { type Question } from '../FAQ.astro'; + +export interface Question { + label: string; + content: string; + hyperlink?: { target: string; link: string }; +} interface FAQDropdownProps { question: Question;