diff --git a/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/[slug]/questions-guides/page.tsx b/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/[slug]/questions-guides/page.tsx index fbf439f36..8783ada8e 100644 --- a/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/[slug]/questions-guides/page.tsx +++ b/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/[slug]/questions-guides/page.tsx @@ -3,7 +3,7 @@ import type { Metadata } from 'next/types'; import { INTERVIEWS_REVAMP_BOTTOM_CONTENT } from '~/data/FeatureFlags'; -import InterviewsCompanyGuidePage from '~/components/interviews/company/InterviewsCompanyGuidePage'; +import InterviewsCompanyGuidePage from '~/components/interviews/questions/listings/learning/company/InterviewsCompanyGuidePage'; import { fetchInterviewListingBottomContent } from '~/db/contentlayer/InterviewsListingBottomContentReader'; import { diff --git a/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/page.tsx b/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/page.tsx index 5f899b043..a7c0c36aa 100644 --- a/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/page.tsx +++ b/apps/web/src/app/[locale]/(interviews)/(sidebar)/(sidebar-expanded)/(no-subnav)/(study-list)/interviews/company/page.tsx @@ -2,7 +2,7 @@ import type { Metadata } from 'next/types'; import { INTERVIEWS_REVAMP_BOTTOM_CONTENT } from '~/data/FeatureFlags'; -import InterviewsCompanyGuideListPage from '~/components/interviews/company/InterviewsCompanyGuideListPage'; +import InterviewsCompanyGuideListPage from '~/components/interviews/questions/listings/learning/company/InterviewsCompanyGuideListPage'; import { fetchInterviewListingBottomContent } from '~/db/contentlayer/InterviewsListingBottomContentReader'; import { fetchInterviewsStudyLists } from '~/db/contentlayer/InterviewsStudyListReader'; diff --git a/apps/web/src/components/interviews/company/InterviewsCompanyInsiderTipsSlider.tsx b/apps/web/src/components/interviews/company/InterviewsCompanyInsiderTipsSlider.tsx deleted file mode 100644 index d77024310..000000000 --- a/apps/web/src/components/interviews/company/InterviewsCompanyInsiderTipsSlider.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import clsx from 'clsx'; -import { useEffect, useRef, useState } from 'react'; - -import { useIntl } from '~/components/intl'; -import Heading from '~/components/ui/Heading'; -import Text from '~/components/ui/Text'; -import { - themeOutlineElement_FocusVisible, - themeOutlineElementBrandColor_FocusVisible, -} from '~/components/ui/theme'; - -import * as TabsPrimitive from '@radix-ui/react-tabs'; - -type Props = Readonly<{ - data: ReadonlyArray<{ - content: string; - id: string; - }>; -}>; - -export default function InterviewsCompanyInsiderTipsSlider({ data }: Props) { - const intl = useIntl(); - const timer = useRef(); - const [index, setIndex] = useState(0); - - useEffect(() => { - if (data.length > 1) { - timer.current = setInterval(() => { - setIndex((preIndex) => (preIndex + 1) % data.length); - }, 6000); - } - - return () => { - window.clearInterval(timer.current); - }; - }, [data.length]); - - const dataValue = data[index].id; - - return ( -
- - {intl.formatMessage({ - defaultMessage: 'Insider tips', - description: 'Title for inside tips', - id: 'hnbgcq', - })} - - { - // Stop auto-advancing if user interacts with steppers. - window.clearInterval(timer.current); - setIndex(data.findIndex(({ id }) => id === newValue)); - }}> -
- {data.map((item) => ( - - - "{item.content}" - - {' - '} - {intl.formatMessage({ - defaultMessage: 'Interviewers', - description: 'Label for interviewers', - id: 'XwYAwS', - })} - - - - ))} -
- {data.length > 1 && ( - - {data.map((item) => ( - - - - ))} - - )} -
-
- ); -} diff --git a/apps/web/src/components/interviews/company/InterviewsCompanyGuideListPage.tsx b/apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuideListPage.tsx similarity index 100% rename from apps/web/src/components/interviews/company/InterviewsCompanyGuideListPage.tsx rename to apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuideListPage.tsx diff --git a/apps/web/src/components/interviews/company/InterviewsCompanyGuideListWithFilters.tsx b/apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuideListWithFilters.tsx similarity index 100% rename from apps/web/src/components/interviews/company/InterviewsCompanyGuideListWithFilters.tsx rename to apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuideListWithFilters.tsx diff --git a/apps/web/src/components/interviews/company/InterviewsCompanyGuidePage.tsx b/apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuidePage.tsx similarity index 89% rename from apps/web/src/components/interviews/company/InterviewsCompanyGuidePage.tsx rename to apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuidePage.tsx index f19a50581..7cbe5f27f 100644 --- a/apps/web/src/components/interviews/company/InterviewsCompanyGuidePage.tsx +++ b/apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyGuidePage.tsx @@ -31,14 +31,14 @@ import MDXContent from '~/components/mdx/MDXContent'; import Divider from '~/components/ui/Divider'; import Heading from '~/components/ui/Heading'; import Section from '~/components/ui/Heading/HeadingContext'; +import { themeTextSecondaryColor } from '~/components/ui/theme'; import { categorizeQuestionsProgress, filterQuestionsProgressByList, } from '~/db/QuestionsUtils'; -import InterviewsCompanyInsiderTipsSlider from './InterviewsCompanyInsiderTipsSlider'; -import useQuestionTopicLabels from '../questions/listings/filters/useQuestionTopicLabels'; +import useQuestionTopicLabels from '../../filters/useQuestionTopicLabels'; import { useUser } from '@supabase/auth-helpers-react'; @@ -119,20 +119,6 @@ export default function InterviewsCompanyGuidePage({ }, ]; - // TODO(interviews): add real insider tips data - const insiderTipsData = [ - { - content: - 'Amazon is known to focus a lot on behavioral questions and their Leadership Principles. Hence be well-prepared in the non-technical aspects too.', - id: 'tip1', - }, - { - content: - 'Google is known to focus a lot on behavioral questions and their Leadership Principles. Hence be well-prepared in the non-technical aspects too.', - id: 'tip2', - }, - ]; - return (
@@ -155,11 +141,15 @@ export default function InterviewsCompanyGuidePage({ }, )} /> - {/* Insider tips */} - {insiderTipsData.length > 0 && ( -
- -
+ {studyList.body.code && ( + )}
diff --git a/apps/web/src/components/interviews/company/InterviewsCompanyRoundCard.tsx b/apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyRoundCard.tsx similarity index 100% rename from apps/web/src/components/interviews/company/InterviewsCompanyRoundCard.tsx rename to apps/web/src/components/interviews/questions/listings/learning/company/InterviewsCompanyRoundCard.tsx diff --git a/apps/web/src/locales/en-US.json b/apps/web/src/locales/en-US.json index 1e13f01c4..674cd2fd6 100644 --- a/apps/web/src/locales/en-US.json +++ b/apps/web/src/locales/en-US.json @@ -5347,10 +5347,6 @@ "defaultMessage": "Account", "description": "Profile account tab title" }, - "XwYAwS": { - "defaultMessage": "Interviewers", - "description": "Label for interviewers" - }, "XwbyU0": { "defaultMessage": "Types of UI questions, concepts to cover and rubrics", "description": "Front End User Interface interview questions, concepts and rubrics" @@ -6887,10 +6883,6 @@ "defaultMessage": "Delete comment?", "description": "Delete comment confirmation dialog title" }, - "hnbgcq": { - "defaultMessage": "Insider tips", - "description": "Title for inside tips" - }, "hqeSrQ": { "defaultMessage": "Everything else apart from the actual technical execution has been prepared for you. Just click \"Start project\", and we will take care of everything else.", "description": "Description of 'Start building' feature in Projects marketing page"