diff --git a/src/components/App/SideBar/SelectedNodeView/Default/index.tsx b/src/components/App/SideBar/SelectedNodeView/Default/index.tsx index d6328f912..752547c7d 100644 --- a/src/components/App/SideBar/SelectedNodeView/Default/index.tsx +++ b/src/components/App/SideBar/SelectedNodeView/Default/index.tsx @@ -1,5 +1,6 @@ import Button from '@mui/material/Button' import clsx from 'clsx' +import moment from 'moment' import { useEffect, useRef, useState } from 'react' import styled from 'styled-components' import { Divider } from '~/components/common/Divider' @@ -95,7 +96,7 @@ export const Default = () => { isPlaying={isPlaying} label={formatLabel(key)} togglePlay={togglePlay} - value={value} + value={key === 'date' && value ? moment(value * 1000).format('MMMM Do YYYY') : value} /> ))} diff --git a/src/utils/apiUrlFromSwarmHost/__tests__/index.ts b/src/utils/apiUrlFromSwarmHost/__tests__/index.ts index bf5fc4120..cf6c2b81e 100644 --- a/src/utils/apiUrlFromSwarmHost/__tests__/index.ts +++ b/src/utils/apiUrlFromSwarmHost/__tests__/index.ts @@ -13,18 +13,18 @@ describe('apiUrlFromSwarmHost', () => { jest.restoreAllMocks() }) - it('returns "https://knowledge-graph.sphinx.chat/api" for the URL "https://second-brain.sphinx.chat"', () => { + it('returns "https://bitcoin.sphinx.chat/api" for the URL "https://second-brain.sphinx.chat"', () => { mockWindowLocation('https://second-brain.sphinx.chat') - expect(apiUrlFromSwarmHost()).toBe('https://knowledge-graph.sphinx.chat/api') + expect(apiUrlFromSwarmHost()).toBe('https://bitcoin.sphinx.chat/api') }) - it('returns "https://knowledge-graph.sphinx.chat/api" for a URL containing "localhost"', () => { + it('returns "https://bitcoin.sphinx.chat/api" for a URL containing "localhost"', () => { mockWindowLocation('http://localhost:3000') - expect(apiUrlFromSwarmHost()).toBe('https://knowledge-graph.sphinx.chat/api') + expect(apiUrlFromSwarmHost()).toBe('https://bitcoin.sphinx.chat/api') }) it('returns the original URL appended with /api for a URL not containing "swarm" and not hardcoded', () => { - const nonSwarmUrl = 'https://knowledge-graph.sphinx.chat' + const nonSwarmUrl = 'https://bitcoin.sphinx.chat' mockWindowLocation(nonSwarmUrl) expect(apiUrlFromSwarmHost()).toBe(`${nonSwarmUrl}/api`) diff --git a/src/utils/apiUrlFromSwarmHost/index.ts b/src/utils/apiUrlFromSwarmHost/index.ts index 7e3483486..763fefd2e 100644 --- a/src/utils/apiUrlFromSwarmHost/index.ts +++ b/src/utils/apiUrlFromSwarmHost/index.ts @@ -2,7 +2,7 @@ const { origin, host } = window.location const getUrlFormEnv = () => import.meta.env.VITE_APP_API_URL -export const API_URL = getUrlFormEnv() || apiUrlFromSwarmHost() || 'https://knowledge-graph.sphinx.chat' +export const API_URL = getUrlFormEnv() || apiUrlFromSwarmHost() || 'https://bitcoin.sphinx.chat' export function apiUrlFromSwarmHost(): string | undefined { // for swarm deployments, always point to "boltwall" @@ -21,8 +21,8 @@ export function apiUrlFromSwarmHost(): string | undefined { url = `https://${finalHost}` } - } else if (originUrl === 'https://second-brain.sphinx.chat' || origin.includes('localhost')) { - url = 'https://knowledge-graph.sphinx.chat' + } else if (origin.includes('localhost')) { + url = 'https://bitcoin.sphinx.chat' } return `${url}/api`