diff --git a/src/pages/index.tsx b/src/app/page.tsx
similarity index 83%
rename from src/pages/index.tsx
rename to src/app/page.tsx
index e3de527..a00745f 100644
--- a/src/pages/index.tsx
+++ b/src/app/page.tsx
@@ -1,3 +1,4 @@
+'use client';
import * as React from 'react';
import Carousel, { CarouselProps } from '@/components/carousel/Carousel';
@@ -14,17 +15,13 @@ export default function HomePage() {
{
title: 'Life in a bubble',
subtitle: 'The van',
- clickAction: () => {
- return;
- },
+ link: '/',
imgSrc: '/images/test.png',
},
{
title: 'Life in a bubble',
subtitle: 'The van',
- clickAction: () => {
- return;
- },
+ link: '/',
imgSrc: '/images/test.png',
},
],
@@ -35,17 +32,13 @@ export default function HomePage() {
{
title: 'Life in a bubble',
subtitle: 'The van',
- clickAction: () => {
- return;
- },
+ link: '/',
imgSrc: '/images/test.png',
},
{
title: 'Life in a bubble',
subtitle: 'The van',
- clickAction: () => {
- return;
- },
+ link: '/',
imgSrc: '/images/test.png',
},
],
diff --git a/src/pages/search.tsx b/src/app/search/page.tsx
similarity index 65%
rename from src/pages/search.tsx
rename to src/app/search/page.tsx
index 3192f83..05ea4f7 100644
--- a/src/pages/search.tsx
+++ b/src/app/search/page.tsx
@@ -1,11 +1,11 @@
-import * as React from 'react';
-
-import Seo from '@/components/Seo';
+import { Metadata } from 'next';
+export const metadata: Metadata = {
+ title: 'Search',
+};
export default function Search() {
return (
<>
-
Searching...
diff --git a/src/components/NextImage.tsx b/src/components/NextImage.tsx
index 4a00355..bfb9023 100644
--- a/src/components/NextImage.tsx
+++ b/src/components/NextImage.tsx
@@ -1,3 +1,4 @@
+'use client';
import Image, { ImageProps } from 'next/image';
import * as React from 'react';
diff --git a/src/components/layout/Player.tsx b/src/components/Player.tsx
similarity index 99%
rename from src/components/layout/Player.tsx
rename to src/components/Player.tsx
index c4ae88a..a15ef86 100644
--- a/src/components/layout/Player.tsx
+++ b/src/components/Player.tsx
@@ -7,12 +7,13 @@ import {
ImVolumeHigh,
} from 'react-icons/im';
+import '@/styles/globals.css';
+
import clsxm from '@/lib/clsxm';
import IconButton from '@/components/buttons/IconButton';
import NextImage from '@/components/NextImage';
import Slider from '@/components/Slider';
-
interface PlayerProps {
className?: string;
}
diff --git a/src/components/Seo.tsx b/src/components/Seo.tsx
deleted file mode 100644
index b259ab6..0000000
--- a/src/components/Seo.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-import Head from 'next/head';
-import { useRouter } from 'next/router';
-
-const defaultMeta = {
- title: 'Nex | Music Player',
- siteName: 'Nex | Music Player',
- description: 'A spotify inspired music players for communities and groups',
- /** Without additional '/' on the end, e.g. https://theodorusclarence.com */
- url: 'https://nex.theditor.xyz',
- type: 'website',
- robots: 'follow, index',
- /**
- * No need to be filled, will be populated with openGraph function
- * If you wish to use a normal image, just specify the path below
- */
- image: 'https://theditor.xyz/assets/img/profile-img.jpg',
-};
-
-type SeoProps = {
- date?: string;
- templateTitle?: string;
-} & Partial;
-
-export default function Seo(props: SeoProps) {
- const router = useRouter();
- const meta = {
- ...defaultMeta,
- ...props,
- };
- meta['title'] = props.templateTitle
- ? `${props.templateTitle} | ${meta.siteName}`
- : meta.title;
-
- // Use siteName if there is templateTitle
- // but show full title if there is none
- // !STARTERCONF Follow config for opengraph, by deploying one on https://github.com/theodorusclarence/og
- // ? Uncomment code below if you want to use default open graph
- // meta['image'] = openGraph({
- // description: meta.description,
- // siteName: props.templateTitle ? meta.siteName : meta.title,
- // templateTitle: props.templateTitle,
- // });
-
- return (
-
- {meta.title}
-
-
-
-
- {/* Open Graph */}
-
-
-
-
-
- {/* Twitter */}
-
-
-
-
-
- {meta.date && (
- <>
-
-
-
- >
- )}
-
- {/* Favicons */}
- {favicons.map((linkProps) => (
-
- ))}
-
-
-
-
- );
-}
-
-const favicons: Array> = [
- {
- rel: 'apple-touch-icon',
- sizes: '180x180',
- href: '/favicon/apple-touch-icon.png',
- },
- {
- rel: 'icon',
- type: 'image/png',
- sizes: '32x32',
- href: '/favicon/favicon-32x32.png',
- },
- {
- rel: 'icon',
- type: 'image/png',
- sizes: '16x16',
- href: '/favicon/favicon-16x16.png',
- },
- { rel: 'manifest', href: '/favicon/site.webmanifest' },
- {
- rel: 'mask-icon',
- href: '/favicon/safari-pinned-tab.svg',
- color: '#00e887',
- },
- { rel: 'shortcut icon', href: '/favicon/favicon.ico' },
-];
diff --git a/src/components/carousel/Carousel.tsx b/src/components/carousel/Carousel.tsx
index d0271b6..68f8fb4 100644
--- a/src/components/carousel/Carousel.tsx
+++ b/src/components/carousel/Carousel.tsx
@@ -15,7 +15,7 @@ export default function Carousel({ data }: CarouselProps) {
title={v.title}
subtitle={v.subtitle}
imgSrc={v.imgSrc}
- clickAction={v.clickAction}
+ link={v.link}
/>
))}
diff --git a/src/components/carousel/CarouselItem.tsx b/src/components/carousel/CarouselItem.tsx
index efa6832..0da5b4f 100644
--- a/src/components/carousel/CarouselItem.tsx
+++ b/src/components/carousel/CarouselItem.tsx
@@ -1,3 +1,6 @@
+'use client';
+import { redirect } from 'next/navigation';
+
import clsxm from '@/lib/clsxm';
import NextImage from '@/components/NextImage';
@@ -5,7 +8,7 @@ import NextImage from '@/components/NextImage';
export interface CarouselItemProps {
title: string;
subtitle: string;
- clickAction: () => void;
+ link: string;
imgSrc: string;
className?: string;
}
@@ -13,7 +16,7 @@ export interface CarouselItemProps {
export default function CarouselItem({
title,
subtitle,
- clickAction,
+ link,
imgSrc,
className,
}: CarouselItemProps) {
@@ -23,7 +26,7 @@ export default function CarouselItem({
className,
'text-light font-quicksand hover:bg-light flex w-fit cursor-pointer select-none flex-col gap-1 rounded-3xl p-3 transition-all ease-linear hover:bg-opacity-10'
)}
- onClick={() => clickAction()}
+ onClick={() => redirect(link)}
>
-
-
-