Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
update to next.js 13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mrquantumoff committed Feb 24, 2023
2 parents 144e9fb + c5940e3 commit 07dbfac
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"typescript.tsdk": "node_modules\\.pnpm\\[email protected]\\node_modules\\typescript\\lib",
"typescript.tsdk": "node_modules/.pnpm/[email protected]/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
}
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, Demir Yerli

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 5 additions & 5 deletions app/[id]/actualPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function SongActualPage({ song }: ISongParams) {
if (song === null) {
return <Error></Error>;
}
const [imageClass, setCurrentImageClass] = useState<string>("blur");
const [openLink, setOpenLink] = useState<() => void>(() => { });
const defaultPlatforms = (<div className="links card">
<Link href={song.spotifyLink ?? "/not-there-yet"}>
Expand Down Expand Up @@ -51,11 +50,12 @@ export default function SongActualPage({ song }: ISongParams) {
<div className={`card artwork`}>
<Image placeholder="blur" blurDataURL="https://i.scdn.co/image/ab67616d0000b273cad190f1a73c024e5a40dddd" src={
song.artworkUrl
} alt="https://i.scdn.co/image/ab67616d0000b273cad190f1a73c024e5a40dddd" width="500" height="500" />
} alt="https://i.scdn.co/image/ab67616d0000b273cad190f1a73c024e5a40dddd" width="400" height="400" />
</div>
<h1 className="text-5xl text text-center">{song.name}</h1>
<h2 className="text-3xl text text-center">{song.artist}</h2>
<b>
<h1 className="text-4xl text text-center">{song.name}</h1>
<h2 className="text-2xl text text-center">{song.artist}</h2>
</b>
{platforms}
{/* </div> */}
</>)
}
6 changes: 5 additions & 1 deletion app/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ export async function generateMetadata({ params }: any): Promise<Metadata> {
}


export const revalidate = 120;

export default async function SongPage({ params }: any) {
const song: ISong | null = await getSongApi(params.id);

return <SongActualPage song={song}></SongActualPage>
return <div className="center">
<SongActualPage song={song} />
</div>
}
6 changes: 3 additions & 3 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@tailwind utilities;

.center {
@apply flex flex-col items-center justify-center h-screen;
@apply flex flex-col items-center justify-center;
}

html {
Expand All @@ -23,7 +23,7 @@ html {
}

.artwork {
@apply p-4 mb-5;
@apply p-4 mt-10 mb-5;
}

.platform {
Expand All @@ -35,7 +35,7 @@ html {
}

.copyright {
@apply text-sm mt-2 text-center;
@apply text-sm text-center mt-5;
}

.apple {
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export default function RootLayout({
<html>
<head />
<body className={`${inter.className}`}>
<div className="center">
<div className="center h-screen">
{children}
<p className="copyright">Powered by MultiShare. Copyright © 2023, <Link href="https://mrquantumoff.dev">Demir Yerli.</Link></p>
<p className="copyright text-sm">This webpage is powered by MultiShare. Copyright © 2023, <Link href="https://mrquantumoff.dev">Demir Yerli.</Link></p>
<AnalyticsWrapper></AnalyticsWrapper>
</div>
</body>
Expand Down
8 changes: 5 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
export default function Home() {
return (
<div className="text-2xl card">
<h1 className="text">This page is empty(</h1>
<h1 className="text">Multishare doesn&apos;t contain a main page, it only contains song pages</h1>
<div className="center h-screen">
<div className="text-2xl card">
<h1 className="text">This page is empty(</h1>
<h1 className="text">Multishare doesn&apos;t contain a main page, it only contains song pages</h1>
</div>
</div>
)
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"lint": "next lint"
},
"dependencies": {
"@next/font": "13.1.6",
"@supabase/supabase-js": "^2.8.0",
"@types/node": "18.14.1",
"@types/node": "18.13.0",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@vercel/analytics": "^0.1.10",
Expand Down
14 changes: 10 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 07dbfac

Please sign in to comment.