forked from tangly1024/NotionNext
-
Notifications
You must be signed in to change notification settings - Fork 0
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
762c9e9
commit d2f97f7
Showing
5 changed files
with
55 additions
and
24 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { SignOutButton } from '@clerk/nextjs' | ||
/** | ||
* 控制台登出按钮 | ||
* @returns | ||
*/ | ||
export default function DashboardSignOutButton() { | ||
const enableClerk = process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ||
if (!enableClerk) { | ||
return null | ||
} | ||
return ( | ||
<SignOutButton redirectUrl='/'> | ||
<button className='text-white bg-gray-800 hover:bg-gray-900 hover:ring-4 hover:ring-gray-300 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700'> | ||
<span className='text-nowrap'> | ||
<i className='fas fa-right-from-bracket' /> Sign Out | ||
</span> | ||
</button> | ||
</SignOutButton> | ||
) | ||
} |
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,24 @@ | ||
import { UserProfile } from '@clerk/nextjs' | ||
/** | ||
* 控制台用户账号面板 | ||
* @returns | ||
*/ | ||
export default function DashboardUser() { | ||
const enableClerk = process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ||
if (!enableClerk) { | ||
return null | ||
} | ||
return ( | ||
<UserProfile | ||
appearance={{ | ||
elements: { | ||
cardBox: 'w-full', | ||
rootBox: 'w-full' | ||
} | ||
}} | ||
className='bg-blue-300' | ||
routing='path' | ||
path='/dashboard/user-profile' | ||
/> | ||
) | ||
} |
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