)
diff --git a/apps/web/components/toc.tsx b/apps/web/components/toc.tsx
index d91db29..f39a77b 100644
--- a/apps/web/components/toc.tsx
+++ b/apps/web/components/toc.tsx
@@ -11,17 +11,14 @@ interface TocProps {
}
export function DashboardTableOfContents({ toc }: TocProps) {
- const itemIds = React.useMemo(
- () =>
- toc.items
- ? toc.items
- .flatMap(item => [item.url, item?.items?.map(item => item.url)])
- .flat()
- .filter(Boolean)
- .map(id => id?.split('#')[1])
- : [],
- [toc],
- )
+ const itemIds = React.useMemo(() => toc.items
+ ? toc.items
+ .flatMap(item => [item.url, item?.items?.map(item => item.url)])
+ .flat()
+ .filter(Boolean)
+ .map(id => id?.split('#')[1])
+ : [], [toc])
+
const activeHeading = useActiveItem(itemIds)
const mounted = useMounted()
diff --git a/apps/web/constants/faqs.ts b/apps/web/constants/faqs.ts
new file mode 100644
index 0000000..b015e78
--- /dev/null
+++ b/apps/web/constants/faqs.ts
@@ -0,0 +1,44 @@
+// generate array of FAQ
+
+export const FAQs = [
+ {
+ question: 'What is the purpose of this app?',
+ answer: 'The purpose of this app is to provide a platform for users to search for and view information about various movies and TV shows.',
+ },
+ {
+ question: 'How do I search for a movie or TV show?',
+ answer: 'You can search for a movie or TV show by typing the name of the movie or TV show in the search bar at the top of the page.',
+ },
+ {
+ question: 'How do I view information about a movie or TV show?',
+ answer: 'You can view information about a movie or TV show by clicking on the movie or TV show in the search results.',
+ },
+ {
+ question: 'How do I save a movie or TV show to my watchlist?',
+ answer: 'You can save a movie or TV show to your watchlist by clicking the "Add to Watchlist" button on the movie or TV show page.',
+ },
+ {
+ question: 'How do I view my watchlist?',
+ answer: 'You can view your watchlist by clicking the "Watchlist" link in the navigation bar at the top of the page.',
+ },
+ {
+ question: 'How do I remove a movie or TV show from my watchlist?',
+ answer: 'You can remove a movie or TV show from your watchlist by clicking the "Remove from Watchlist" button on the movie or TV show page.',
+ },
+ {
+ question: 'How do I view information about a movie or TV show in my watchlist?',
+ answer: 'You can view information about a movie or TV show in your watchlist by clicking on the movie or TV show in the watchlist.',
+ },
+ {
+ question: 'How do I clear my watchlist?',
+ answer: 'You can clear your watchlist by clicking the "Clear Watchlist" button on the watchlist page.',
+ },
+ {
+ question: 'How do I view information about a movie or TV show in my watchlist?',
+ answer: 'You can view information about a movie or TV show in your watchlist by clicking on the movie or TV show in the watchlist.',
+ },
+ {
+ question: 'How do I clear my watchlist?',
+ answer: 'You can clear your watchlist by clicking the "Clear Watchlist" button on the watchlist page.',
+ },
+]