generated from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c276ad8
commit 1a7e7c0
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { GetServerSideProps } from "next"; | ||
import { getSession } from "next-auth/react"; | ||
import DashboardLayout from "~~/components/dashboard/DashboardLayout"; | ||
import Heading from "~~/components/spotify/Heading"; | ||
import Layout from "~~/components/spotify/Layout"; | ||
import { MySession } from "~~/types/session"; | ||
import { PlaylistType } from "~~/types/spotify"; | ||
import { isAuthenticated } from "~~/utils/beat-bridge/isAuthenticated"; | ||
|
||
interface IProps { | ||
userPlaylist: PlaylistType[]; | ||
} | ||
|
||
export default function FollowedArtists({ userPlaylist }: IProps) { | ||
console.log(userPlaylist); | ||
return ( | ||
<DashboardLayout> | ||
<Layout title="Beat Bridge - Your Wrapped"> | ||
<Heading text="Your Wrapped" /> | ||
</Layout> | ||
</DashboardLayout> | ||
); | ||
} | ||
|
||
export const getServerSideProps: GetServerSideProps = async ctx => { | ||
const session = (await getSession(ctx)) as MySession | null; | ||
|
||
if (!(await isAuthenticated(session))) { | ||
return { | ||
redirect: { | ||
destination: "/login", | ||
permanent: false, | ||
}, | ||
}; | ||
} | ||
|
||
return { props: { userPlaylist: [] } }; | ||
}; |