File tree Expand file tree Collapse file tree 6 files changed +66
-32
lines changed Expand file tree Collapse file tree 6 files changed +66
-32
lines changed Original file line number Diff line number Diff line change 15
15
"react-dom" : " ^18.3.1" ,
16
16
"react-markdown" : " ^9.0.1" ,
17
17
"react-router-dom" : " ^6.26.1" ,
18
+ "remark-breaks" : " ^4.0.0" ,
18
19
"remark-gfm" : " ^4.0.0"
19
20
},
20
21
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ const AuthLayout = () => {
32
32
</ div >
33
33
< div className = 'animate-fadeIn flex flex-col items-center gap-2 text-center ' >
34
34
< 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 >
40
42
</ div >
41
43
</ div >
42
44
) ;
Original file line number Diff line number Diff line change @@ -14,11 +14,13 @@ const Layout = () => {
14
14
< div className = 'min-h-screen flex flex-col' >
15
15
{ isLoggedIn ( ) && (
16
16
< 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 >
22
24
< div className = 'flex items-center gap-2 text-center ml-auto mr-0 justify-center' >
23
25
< span className = 'text-xs text-gray-800 mt-1.5' > By</ span >
24
26
< img
@@ -31,22 +33,24 @@ const Layout = () => {
31
33
onClick = { handleLogout }
32
34
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'
33
35
>
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 >
50
54
</ button >
51
55
</ div >
52
56
) }
Original file line number Diff line number Diff line change 1
1
import { createContext , useContext } from 'react' ;
2
2
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;
4
5
const AuthContext = createContext ( ) ;
5
6
6
7
export const AuthProvider = ( { children } ) => {
Original file line number Diff line number Diff line change 1
1
import { useState , useRef , useEffect } from 'react' ;
2
2
import ReactMarkdown from 'react-markdown' ;
3
3
import remarkGfm from 'remark-gfm' ;
4
+ import remarkBreaks from 'remark-breaks' ;
4
5
5
6
import { useAuth } from '../auth/AuthProvider' ;
6
7
@@ -12,7 +13,7 @@ const chatApiUrl = import.meta.env.VITE_CHAT_API_URL;
12
13
const FormattedText = ( { children } ) => {
13
14
return (
14
15
< ReactMarkdown
15
- remarkPlugins = { [ remarkGfm ] }
16
+ remarkPlugins = { [ remarkGfm , remarkBreaks ] }
16
17
components = { {
17
18
li : ( { node, ...props } ) => < li className = 'my-2' { ...props } /> ,
18
19
ol : ( { node, ...props } ) => (
@@ -61,6 +62,7 @@ const ChatPage = () => {
61
62
const [ input , setInput ] = useState (
62
63
'What makes the serverless framework so great?' ,
63
64
) ;
65
+
64
66
const { getToken } = useAuth ( ) ;
65
67
66
68
const bottomRef = useRef ( null ) ;
You can’t perform that action at this time.
0 commit comments