File tree 4 files changed +50
-0
lines changed
4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 23
23
"react" : " ^18.2.0" ,
24
24
"react-dom" : " ^18.2.0" ,
25
25
"react-ga4" : " ^2.1.0" ,
26
+ "react-icons" : " ^4.9.0" ,
26
27
"react-router-dom" : " ^6.11.2" ,
27
28
"react-scripts" : " 5.0.1" ,
28
29
"regenerator-runtime" : " ^0.13.11" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import AgentDisplay from "./AgentDisplay";
7
7
import { locations } from "./data/world" ;
8
8
import AgentChat from "./AgentChat" ;
9
9
import NotificationModal from "./NotificationModal" ;
10
+ import Header from "./Header" ;
10
11
11
12
interface Props {
12
13
openaiKey : string ;
@@ -55,6 +56,7 @@ function Game(props: Props) {
55
56
56
57
return (
57
58
< div className = 'p-5 overflow-scroll bg-gray-50 relative' >
59
+ < Header />
58
60
< AgentDisplay agent = { agents [ selectedAgentIndex ] } />
59
61
{ showNotification && (
60
62
< NotificationModal
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ // import from react-icons
3
+ import { FaTwitter , FaGithub , FaDiscord } from "react-icons/fa" ;
4
+
5
+ const button = [
6
+ { href : "https://twitter.com/toughyear" , icon : < FaTwitter /> } ,
7
+ {
8
+ href : "https://github.com/toughyear/generative-agents" ,
9
+ icon : < FaGithub /> ,
10
+ } ,
11
+ { href : "https://discord.com/invite/9NjpMXtVaW" , icon : < FaDiscord /> } ,
12
+ ] ;
13
+
14
+ function Header ( ) {
15
+ return (
16
+ < section >
17
+ < nav className = 'flex px-6 h-16 items-center justify-end gap-2' >
18
+ < a
19
+ href = { "https://multimode.run/" }
20
+ className = 'flex items-center mr-auto font-semibold tracking-wide'
21
+ >
22
+ Generative Agents Demo
23
+ </ a >
24
+ { button . map ( ( { href, icon } ) => {
25
+ return (
26
+ < a
27
+ key = { href }
28
+ href = { href }
29
+ target = '_blank'
30
+ rel = 'noopener noreferrer'
31
+ className = 'hover:opacity-75 p-2'
32
+ >
33
+ { icon }
34
+ </ a >
35
+ ) ;
36
+ } ) }
37
+ </ nav >
38
+ </ section >
39
+ ) ;
40
+ }
41
+
42
+ export default Header ;
Original file line number Diff line number Diff line change @@ -7592,6 +7592,11 @@ react-ga4@^2.1.0:
7592
7592
resolved "https://registry.yarnpkg.com/react-ga4/-/react-ga4-2.1.0.tgz#56601f59d95c08466ebd6edfbf8dede55c4678f9"
7593
7593
integrity sha512-ZKS7PGNFqqMd3PJ6+C2Jtz/o1iU9ggiy8Y8nUeksgVuvNISbmrQtJiZNvC/TjDsqD0QlU5Wkgs7i+w9+OjHhhQ==
7594
7594
7595
+ react-icons@^4.9.0 :
7596
+ version "4.9.0"
7597
+ resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.9.0.tgz#ba44f436a053393adb1bdcafbc5c158b7b70d2a3"
7598
+ integrity sha512-ijUnFr//ycebOqujtqtV9PFS7JjhWg0QU6ykURVHuL4cbofvRCf3f6GMn9+fBktEFQOIVZnuAYLZdiyadRQRFg==
7599
+
7595
7600
react-is@^16.13.1 :
7596
7601
version "16.13.1"
7597
7602
resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
You can’t perform that action at this time.
0 commit comments