Skip to content

Commit 87b76c4

Browse files
committed
feat: update ui
1 parent 9c15ec1 commit 87b76c4

File tree

6 files changed

+66
-32
lines changed

6 files changed

+66
-32
lines changed

package-lock.json

Lines changed: 28 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"react-dom": "^18.3.1",
1616
"react-markdown": "^9.0.1",
1717
"react-router-dom": "^6.26.1",
18+
"remark-breaks": "^4.0.0",
1819
"remark-gfm": "^4.0.0"
1920
},
2021
"devDependencies": {

website/app/src/app/AuthLayout.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ const AuthLayout = () => {
3232
</div>
3333
<div className='animate-fadeIn flex flex-col items-center gap-2 text-center '>
3434
<span className='text-xs text-gray-800'>Powered By</span>
35-
<img
36-
src='https://s3.us-east-2.amazonaws.com/assets.public.serverless/general/framework-text-lighting-icon-center-black.svg'
37-
alt='Serverless Framework'
38-
className='h-8 p-0 m-0'
39-
/>
35+
<a href='https://serverless.com/' target='_blank'>
36+
<img
37+
src='https://s3.us-east-2.amazonaws.com/assets.public.serverless/general/framework-text-lighting-icon-center-black.svg'
38+
alt='Serverless Framework'
39+
className='h-8 p-0 m-0'
40+
/>
41+
</a>
4042
</div>
4143
</div>
4244
);

website/app/src/app/Layout.jsx

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ const Layout = () => {
1414
<div className='min-h-screen flex flex-col'>
1515
{isLoggedIn() && (
1616
<div className='flex bg-white items-center sticky top-0 left-0 w-full p-4 z-10 shadow-md gap-2'>
17-
<img
18-
src='https://assets.serverless-extras.com/general/logo-aws-ai-stack-black.png'
19-
alt='AWS AI Stack'
20-
className='h-10'
21-
/>
17+
<a href='https://github.com/serverless/aws-ai-stack' target='_blank'>
18+
<img
19+
src='https://assets.serverless-extras.com/general/logo-aws-ai-stack-black.png'
20+
alt='AWS AI Stack'
21+
className='h-10'
22+
/>
23+
</a>
2224
<div className='flex items-center gap-2 text-center ml-auto mr-0 justify-center'>
2325
<span className='text-xs text-gray-800 mt-1.5'>By</span>
2426
<img
@@ -31,22 +33,24 @@ const Layout = () => {
3133
onClick={handleLogout}
3234
className='text-gray-400 bg-transparent px-2 py-2 rounded-md hover:bg-primary hover:text-white focus:outline-none focus:ring-2 focus:ring-primary transition-colors'
3335
>
34-
<svg
35-
xmlns='http://www.w3.org/2000/svg'
36-
width='18'
37-
height='18'
38-
viewBox='0 0 24 24'
39-
fill='none'
40-
stroke='currentColor'
41-
strokeWidth='2'
42-
strokeLinecap='round'
43-
strokeLinejoin='round'
44-
className='lucide lucide-log-out'
45-
>
46-
<path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4' />
47-
<polyline points='16 17 21 12 16 7' />
48-
<line x1='21' x2='9' y1='12' y2='12' />
49-
</svg>
36+
<a href='https://serverless.com/' target='_blank'>
37+
<svg
38+
xmlns='http://www.w3.org/2000/svg'
39+
width='18'
40+
height='18'
41+
viewBox='0 0 24 24'
42+
fill='none'
43+
stroke='currentColor'
44+
strokeWidth='2'
45+
strokeLinecap='round'
46+
strokeLinejoin='round'
47+
className='lucide lucide-log-out'
48+
>
49+
<path d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4' />
50+
<polyline points='16 17 21 12 16 7' />
51+
<line x1='21' x2='9' y1='12' y2='12' />
52+
</svg>
53+
</a>
5054
</button>
5155
</div>
5256
)}

website/app/src/auth/AuthProvider.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createContext, useContext } from 'react';
22

3-
const authApiUrl = import.meta.env.VITE_AUTH_API_URL;
3+
const authApiUrl = 'https://q9x94od3v8.execute-api.us-east-1.amazonaws.com';
4+
// import.meta.env.VITE_AUTH_API_URL;
45
const AuthContext = createContext();
56

67
export const AuthProvider = ({ children }) => {

website/app/src/chat/ChatPage.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState, useRef, useEffect } from 'react';
22
import ReactMarkdown from 'react-markdown';
33
import remarkGfm from 'remark-gfm';
4+
import remarkBreaks from 'remark-breaks';
45

56
import { useAuth } from '../auth/AuthProvider';
67

@@ -12,7 +13,7 @@ const chatApiUrl = import.meta.env.VITE_CHAT_API_URL;
1213
const FormattedText = ({ children }) => {
1314
return (
1415
<ReactMarkdown
15-
remarkPlugins={[remarkGfm]}
16+
remarkPlugins={[remarkGfm, remarkBreaks]}
1617
components={{
1718
li: ({ node, ...props }) => <li className='my-2' {...props} />,
1819
ol: ({ node, ...props }) => (
@@ -61,6 +62,7 @@ const ChatPage = () => {
6162
const [input, setInput] = useState(
6263
'What makes the serverless framework so great?',
6364
);
65+
6466
const { getToken } = useAuth();
6567

6668
const bottomRef = useRef(null);

0 commit comments

Comments
 (0)