Skip to content

Commit

Permalink
fix(types): moves question type definition to FAQDropdown component
Browse files Browse the repository at this point in the history
  • Loading branch information
oahnh committed Jan 11, 2024
1 parent cff4531 commit 6c99ff9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/components/FAQ.astro
Original file line number Diff line number Diff line change
@@ -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[] = [
{
Expand Down
7 changes: 6 additions & 1 deletion src/components/FAQDropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 6c99ff9

Please sign in to comment.