Skip to content

Commit

Permalink
Merge pull request #365 from dappforce/deploy/ai
Browse files Browse the repository at this point in the history
Add AI Experts hub
  • Loading branch information
olehmell authored Aug 31, 2023
2 parents e8b7e92 + 64c4b32 commit 59c6714
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
file: docker/Dockerfile
push: true
build-args: |
GH_NEXT_PUBLIC_SPACE_IDS=1002,1005,1010,1011,1023,1030
GH_NEXT_PUBLIC_SPACE_IDS=1002,1005,1010,1011,1023,1030,1031
GH_NEXT_PUBLIC_MODERATION_URL=https://moderation.subsocial.network/graphql
GH_NOTIFICATIONS_URL=https://grill-notifications.subsocial.network/graphql
GH_NOTIFICATIONS_TOKEN=${{ secrets.NOTIFICATIONS_AUTH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/feature-based.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
GH_USER_ID_SALT=salt
GH_CRUST_IPFS_AUTH=eyJkYXRhIjp7ImRvbWFpbiI6eyJjaGFpbklkIjoiNSIsIm5hbWUiOiJDbG91ZDMuY2MiLCJ2ZXJpZnlpbmdDb250cmFjdCI6IjB4Q2NDQ2NjY2NDQ0NDY0NDQ0NDQ2NDY0NjY0NjQ0NDY0NjY2NjY2NjQyIsInZlcnNpb24iOiIxIn0sIm1lc3NhZ2UiOnsiZGVzY3JpcHRpb24iOiJTaWduIGZvciBXMyBCdWNrZXQgQWNjZXNzIEF1dGhlbnRpY2F0aW9uIiwic2lnbmluZ0FkZHJlc3MiOiIweDAwNDFjNzA1ZTEwNmVlOWRFMjI3Q2ExMzlBZDRBOTlEQjY0NENCM2EiLCJ0b2tlbkFkZHJlc3MiOiIweDM5ODY2Mzg0MjY4MDMzMkExQWJBM0IwM2JkNmRCNDdhRTk4NDk5NEMiLCJ0b2tlbklkIjoiMzAwMDAzNyIsImVmZmVjdGl2ZVRpbWVzdGFtcCI6MTY3ODUzNzYxNywiZXhwaXJhdGlvblRpbWVzdGFtcCI6MH0sInByaW1hcnlUeXBlIjoiVzNCdWNrZXQiLCJ0eXBlcyI6eyJXM0J1Y2tldCI6W3sibmFtZSI6ImRlc2NyaXB0aW9uIiwidHlwZSI6InN0cmluZyJ9LHsibmFtZSI6InNpZ25pbmdBZGRyZXNzIiwidHlwZSI6ImFkZHJlc3MifSx7Im5hbWUiOiJ0b2tlbkFkZHJlc3MiLCJ0eXBlIjoiYWRkcmVzcyJ9LHsibmFtZSI6InRva2VuSWQiLCJ0eXBlIjoic3RyaW5nIn0seyJuYW1lIjoiZWZmZWN0aXZlVGltZXN0YW1wIiwidHlwZSI6InVpbnQyNTYifSx7Im5hbWUiOiJleHBpcmF0aW9uVGltZXN0YW1wIiwidHlwZSI6InVpbnQyNTYifV19fSwic2lnbmF0dXJlIjoiMHhhMTUxODkyZGNhMTZlMTJkZmViYTFjY2FkMjNmZjM5MGVmODQ1MzdhMGI2MWI4YWQ1NDY1ZGI1ZjI1NjZkMWJmMjc3MGE1OTQyMzFmNzFmYzA5YWVlZGJhNzJkZjM5Y2Y4NDIxMTQ3YzJkNWQyNTFkNDZjNGQyMDFlOGM1MmUzZTFjIn0=
GH_NEXT_PUBLIC_CAPTCHA_SITE_KEY=6LeWW0QlAAAAAL1u_pgngcjyH211q3dipMItu_5f
GH_NEXT_PUBLIC_SPACE_IDS=1002,1005,1010,1011,1023,1025,1030
GH_NEXT_PUBLIC_SPACE_IDS=1002,1005,1010,1011,1023,1025,1030,1031
GH_MODERATION_URL=https://staging-moderation.subsocial.network/graphql
GH_MODERATION_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6dHJ1ZX0.Ao4w7g-TvV-o5KgxEiHvSgdxN6MAe0mHe7jS0ZT5rLY
GH_NOTIFICATIONS_URL=https://staging-grill-notifications.subsocial.network/graphql
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const nextConfig = {
{ source: '/hubs', destination: '/' },
{ source: '/my-chats', destination: '/' },
{ source: '/hot-chats', destination: '/' },
{ source: '/ai-bots', destination: '/' },
]
},
async redirects() {
Expand Down
4 changes: 3 additions & 1 deletion src/constants/hubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const ALIAS_TO_HUB_ID_MAP: Record<string, string> = {
decoded: '1023',
d: '1023',
cc: '1030',
ai: '1031',
}

const HUB_ID_TO_ALIAS_MAP = Object.entries(ALIAS_TO_HUB_ID_MAP).reduce(
Expand Down Expand Up @@ -47,7 +48,7 @@ export function getPinnedChatsInHubId(hubId: string) {
}

export const COMMUNITY_CHAT_HUB_ID: string | null = getCommunityHubId() || null
export const PINNED_HUB_IDS = [COMMUNITY_CHAT_HUB_ID].filter(
export const PINNED_HUB_IDS = [COMMUNITY_CHAT_HUB_ID, '1031'].filter(
Boolean
) as string[]

Expand All @@ -58,6 +59,7 @@ const HUB_ID_WITHOUT_JOIN_BUTTON = [
'1010',
'1011',
'1007',
'1031',
]
const CHAT_WITH_JOIN_BUTTON = ['6914']
export function getIsHubWithoutJoinButton(hubId: string, chatId: string) {
Expand Down
24 changes: 15 additions & 9 deletions src/modules/chat/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@ export const homePageAdditionalTabs: {
}[] = [
// Example additional tabs
// {
// id: 'decoded',
// text: 'Decoded',
// hubId: '1023',
// id: 'ai-bots',
// text: 'AI Experts',
// hubId: '1031',
// },
{
id: 'ai-bots',
text: 'AI Bots',
hubId: '1031',
},
]

const pathnameTabIdMapper: Record<string, number> = {
'/my-chats': 0,
'/hot-chats': 1,
'/hubs': 2,
'/ai-bots': 2,
'/hubs': 3,
}

export default function HubsPage(props: HubsPageProps) {
Expand All @@ -61,16 +67,16 @@ export default function HubsPage(props: HubsPageProps) {
<MyChatsContent changeTab={setSelectedTab} />
),
},
...homePageAdditionalTabs.map(({ id, text, hubId }) => ({
id,
text,
content: () => <HotChatsContent hubId={hubId} />,
})),
{
id: 'hot-chats',
text: 'Hot Chats',
content: () => <HotChatsContent hubId={hotChatsHubId} />,
},
...homePageAdditionalTabs.map(({ id, text, hubId }) => ({
id,
text,
content: () => <HotChatsContent hubId={hubId} />,
})),
{
id: 'hubs',
text: 'Hubs',
Expand Down

0 comments on commit 59c6714

Please sign in to comment.