Skip to content

Commit

Permalink
feat: delete ClientPage and add layout.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
supattrw committed Oct 31, 2024
1 parent 8999874 commit eaa9a19
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 311 deletions.
46 changes: 0 additions & 46 deletions src/app/[locale]/(default)/about/LabOps/ClientPage.tsx

This file was deleted.

25 changes: 25 additions & 0 deletions src/app/[locale]/(default)/about/LabOps/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use client";

import {ImageCarousel} from '@/components/about/ImageCarousel';

type CarouselLayoutProps = {
locale: string;
children: React.ReactNode;
};
const images = [
{ id: "image1", src: "/unknown.png", alt: "unknown" },
{ id: "image2", src: "/mock.jpg", alt: "mock" },
{ id: "image3", src: "/bg.jpg", alt: "bg" },
{ id: "image4", src: "/about/pizzaWolfs-min.png", alt: "pizzaWolfs" },
];

export default function CarouselLayout({ locale, children }: CarouselLayoutProps) {
return (
<div className='flex flex-col items-center'>
<div className='flex w-full max-w-full items-center justify-center'>
<ImageCarousel images={images} />
</div>
<div>{children}</div>
</div>
);
}
56 changes: 13 additions & 43 deletions src/app/[locale]/(default)/about/LabOps/page.tsx
Original file line number Diff line number Diff line change
@@ -1,61 +1,31 @@
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/Accordion';
import { Card } from '@/components/ui/Card';
import { useTranslations } from 'next-intl';
import { unstable_setRequestLocale } from 'next-intl/server';
import Image from 'next/image';
import { Card } from '@/components/ui/Card';

import * as React from 'react';
import ClientLabOpsPage from './ClientPage'; // Ensure this path is correct
import { FAQAccordion } from '@/components/about/FAQAccordion';

export default function labopsPage({
params: { locale },
}: {
params: { locale: string};
}) {
unstable_setRequestLocale(locale);
const t = useTranslations('labops');
const t = useTranslations('about.labops');

const faqs = [
{ id: 'faq1', question: t('FAQ.question1'), answer: t('FAQ.answer1') },
{ id: 'faq1', question: t('FAQ.question2'), answer: t('FAQ.answer2') },
{ id: 'faq1', question: t('FAQ.question3'), answer: t('FAQ.answer3') },
];


return (
<div>
<div className=' flex flex-col items-center'>
<div className='flex max-h-[600px] w-full max-w-full items-center justify-center sm:max-h-[400px] sm:max-w-[400px]'>
<ClientLabOpsPage locale={locale} />
</div>
</div>
<h1 className='mt-4 mb-5 w-full dark:text-primary'> LabOps </h1>
<div className='mt-5 mb-5 flex w-full'>
<p>
{t('aboutLabOps')}
</p>
</div>
<h1 className='mt-4 mb-4 w-full dark:text-primary'> {t('title')} </h1>
<div className='flex w-full'> {t('about')} </div>
<div className='mt-10 mb-10'>
<h3> FAQ'S </h3>
<Accordion type="single" collapsible className='w-full dark:text-foreground'>
<AccordionItem value='item-1'>
<AccordionTrigger className='m-2'>
hei
</AccordionTrigger>
<AccordionContent className='m-2 text-base'>
heheeh
</AccordionContent>
</AccordionItem>
<AccordionItem value='item-2'>
<AccordionTrigger className='m-2'>
hei
</AccordionTrigger>
<AccordionContent className='m-2 text-base'>
heheeh
</AccordionContent>
</AccordionItem>
<AccordionItem value='item-3'>
<AccordionTrigger className='m-2'>
hei
</AccordionTrigger>
<AccordionContent className='m-2 text-base'>
heheeh
</AccordionContent>
</AccordionItem>
</Accordion>
<FAQAccordion faqs={(faqs)}/>
</div>
<div className='max-x-xs w-full px-10'>
<div className='grid gap-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 dark:text-primary'>
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/[locale]/(default)/about/breadboard-computer/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { useTranslations } from 'next-intl';
import { getTranslations, unstable_setRequestLocale } from 'next-intl/server';
import Image from 'next/image';

import * as React from 'react';
import ClientBreadboardComputerPage from './ClientPage';

export default function BreadBoardComputerPage({
params: { locale },
Expand Down
46 changes: 0 additions & 46 deletions src/app/[locale]/(default)/about/devops/ClientPage.tsx

This file was deleted.

25 changes: 25 additions & 0 deletions src/app/[locale]/(default)/about/devops/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use client";

import {ImageCarousel} from '@/components/about/ImageCarousel';

type CarouselLayoutProps = {
locale: string;
children: React.ReactNode;
};
const images = [
{ id: "image1", src: "/unknown.png", alt: "unknown"},
{ id: "image2", src: "/mock.jpg", alt: "mock"},
{ id: "image3", src: "/bg.jpg", alt: "bg"},
{ id: "image4", src: "/about/pizzaWolfs-min.png", alt: "pizzaWolfs"},
];

export default function CarouselLayout({ locale, children }: CarouselLayoutProps) {
return (
<div className='flex flex-col items-center'>
<div className='flex w-full max-w-full items-center justify-center'>
<ImageCarousel images={images} />
</div>
<div>{children}</div>
</div>
);
}
45 changes: 4 additions & 41 deletions src/app/[locale]/(default)/about/devops/page.tsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,23 @@
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/Accordion';
import { Card} from '@/components/ui/Card';
import { useTranslations } from 'next-intl';
import { unstable_setRequestLocale } from 'next-intl/server';
import Image from 'next/image';

import * as React from 'react';
import ClientDevOpsPage from './ClientPage';
import { FAQAccordion } from '@/components/about/FAQAccordion';

export default function devopsPage({
params: { locale },
}: {
params: { locale: string };
}) {
unstable_setRequestLocale(locale);
const t = useTranslations('devops');
const t = useTranslations('about.devops');

return (
<div>
<div className='flex flex-col items-center'>
<div className='flex max-h-[600px] w-full max-w-full items-center justify-center sm:max-h-[400px] sm:max-w-[400px]'>
<ClientDevOpsPage locale={locale} />
</div>
</div>
<h1 className='mt-4 mb-4 w-full dark:text-primary'> DevOps </h1>
<div className='mt-5 mb-5 flex w-full'>
{t('information')}
</div>
<div className='flex w-full'> {t('about')} </div>
<div className='mt-10 mb-10'>
<h3> FAQ'S </h3>
<Accordion type="single" collapsible className='mb-10 w-full'>
<AccordionItem value='item-1'>
<AccordionTrigger className='m-2'>
<h4 className='text-left font-medium'>{t('question1')}</h4>
</AccordionTrigger>
<AccordionContent className='m-2 text-base'>
{t('answer1')}
</AccordionContent>
</AccordionItem>
<AccordionItem value='item-2'>
<AccordionTrigger className='m-2'>
<h4 className='text-left font-medium'>{t('question2')}</h4>
</AccordionTrigger>
<AccordionContent className='m-2 text-base'>
{t('answer2')}
</AccordionContent>
</AccordionItem>
<AccordionItem value='item-3'>
<AccordionTrigger className='m-2'>
<h4 className='text-left font-medium'>{t('question3')}</h4>
</AccordionTrigger>
<AccordionContent className='m-2 text-base'>
{t('answer3')}
</AccordionContent>
</AccordionItem>
</Accordion>

</div>
<div className='max-x-xs w-full px-10'>
<div className='grid gap-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 dark:text-primary'>
Expand All @@ -69,7 +33,6 @@ export default function devopsPage({
</div>
<div>
<h3 className=''> Medlemmer </h3>
{/* biome-ignore lint/a11y/noRedundantRoles: <explanation> */}
<ul role='list' className='divide-y divide-grey-100 dark:text-foreground'>
<li className='flex justify-between gap-x-6 py-1'>
<div className='flex min-w-0 gap-4'>
Expand Down
46 changes: 0 additions & 46 deletions src/app/[locale]/(default)/about/game/ClientPage.tsx

This file was deleted.

Loading

0 comments on commit eaa9a19

Please sign in to comment.