-
Notifications
You must be signed in to change notification settings - Fork 10
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
Showing
10 changed files
with
107 additions
and
27 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
'use client'; | ||
|
||
import { Button } from 'antd'; | ||
import { useRouter } from 'next/navigation'; | ||
import * as React from 'react'; | ||
|
||
import { useStyles } from '../styles/not-found-styles'; | ||
|
||
const NotFound = () => { | ||
const { styles } = useStyles(); | ||
const router = useRouter(); | ||
return ( | ||
<div className={styles.wrapper404}> | ||
<div className={styles.content}> | ||
<div className={styles.imgBg}></div> | ||
<div className={styles.text}>很抱歉,页面不小心迷路了</div> | ||
<div className={styles.btn}> | ||
<Button | ||
ghost | ||
onClick={() => { | ||
router.push('/chat'); | ||
}} | ||
size="large" | ||
type="primary" | ||
> | ||
返回首页 | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default NotFound; |
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,27 +1,27 @@ | ||
import { sdk } from '@tenx-ui/bff-client'; | ||
// import { sdk } from '@tenx-ui/bff-client'; | ||
import type { Metadata } from 'next'; | ||
import React from 'react'; | ||
|
||
import SettingClient from './SettingClient/Index'; | ||
import SettingClient from './SettingClient'; | ||
|
||
export const metadata: Metadata = { | ||
title: '个人设置', | ||
}; | ||
|
||
export default async function DesktopPage() { | ||
export default async function SettingPage() { | ||
// swr SSR example, will be removed in the future | ||
// see https://github.com/vercel/swr/blob/main/examples/server-render/pages/index.js | ||
const userData = await sdk | ||
.getCurrentUser(undefined, { | ||
Authorization: 'bearer <id_token>', | ||
}) | ||
.catch(error => { | ||
console.warn('getCurrentUser failed', error); | ||
}); | ||
// const userData = await sdk | ||
// .getCurrentUser(undefined, { | ||
// Authorization: 'bearer <id_token>', | ||
// }) | ||
// .catch(error => { | ||
// console.warn('getCurrentUser failed', error); | ||
// }); | ||
|
||
return ( | ||
<> | ||
<SettingClient userData={userData!} /> | ||
<SettingClient /> | ||
</> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { createStyles } from 'antd-style'; | ||
|
||
export const useStyles = createStyles(() => { | ||
return { | ||
wrapper404: { | ||
height: '100vh', | ||
width: '100vw', | ||
position: 'relative', | ||
}, | ||
|
||
content: { | ||
position: 'absolute', | ||
top: '50%', | ||
left: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
textAlign: 'center', | ||
}, | ||
|
||
imgBg: { | ||
backgroundImage: 'url(/404/404.png)', | ||
height: '420px', | ||
width: '500px', | ||
maxWidth: '100vw', | ||
backgroundRepeat: 'no-repeat', | ||
backgroundPosition: 'center', | ||
marginBottom: '24px', | ||
}, | ||
|
||
text: { | ||
fontSize: '24px', | ||
marginBottom: '24px', | ||
}, | ||
btn: { | ||
'.ant-btn': { | ||
paddingLeft: '30px', | ||
paddingRight: '30px', | ||
fontSize: '16px', | ||
height: 'auto', | ||
}, | ||
}, | ||
}; | ||
}); |