-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into PRWLR-5496-review-behavior-of-kubernetes-c…
…redentials
- Loading branch information
Showing
22 changed files
with
469 additions
and
97 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,30 +1,39 @@ | ||
import { Spacer } from "@nextui-org/react"; | ||
import { redirect } from "next/navigation"; | ||
import React from "react"; | ||
import React, { Suspense } from "react"; | ||
|
||
// import { getUserByMe } from "@/actions/auth/auth"; | ||
import { auth } from "@/auth.config"; | ||
import { getProfileInfo } from "@/actions/users/users"; | ||
import { Header } from "@/components/ui"; | ||
import { SkeletonUserInfo } from "@/components/users/profile"; | ||
import { UserInfo } from "@/components/users/profile/user-info"; | ||
import { UserProfileProps } from "@/types"; | ||
|
||
export default async function Profile() { | ||
const session = await auth(); | ||
|
||
if (!session?.user) { | ||
// redirect("/sign-in?returnTo=/profile"); | ||
redirect("/sign-in"); | ||
} | ||
|
||
// const user = await getUserByMe(); | ||
|
||
return ( | ||
<> | ||
<Header title="User Profile" icon="ci:users" /> | ||
<Spacer y={4} /> | ||
<Spacer y={6} /> | ||
<pre>{JSON.stringify(session.user, null, 2)}</pre> | ||
<pre>{JSON.stringify(session.userId, null, 2)}</pre> | ||
<pre>{JSON.stringify(session.tenantId, null, 2)}</pre> | ||
<pre>{JSON.stringify(session, null, 2)}</pre> | ||
<div className="min-h-screen"> | ||
<div className="container mx-auto space-y-8 px-0 py-6"> | ||
<div className="grid grid-cols-12 gap-6"> | ||
<div className="col-span-12 lg:col-span-3"> | ||
<Suspense fallback={<SkeletonUserInfo />}> | ||
<SSRDataUser /> | ||
</Suspense> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
const SSRDataUser = async () => { | ||
const userProfile: UserProfileProps = await getProfileInfo(); | ||
|
||
return ( | ||
<> | ||
<h3 className="mb-4 text-sm font-bold">User Info</h3> | ||
<UserInfo user={userProfile?.data} /> | ||
</> | ||
); | ||
}; |
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
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
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
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
Oops, something went wrong.