diff --git a/src/app/routes/routes.ts b/src/app/routes/routes.ts
index 7a216f0..a61f5c0 100644
--- a/src/app/routes/routes.ts
+++ b/src/app/routes/routes.ts
@@ -1,4 +1,4 @@
-export const CHAT_PAGE_ROUTE = `/chat`;
+export const CHAT_PAGE_ROUTE = `/`;
export const DECK_PAGE_PARAM = 'deckId';
export const DECK_PAGE_ROUTE = `/deck/:${DECK_PAGE_PARAM}`;
diff --git a/src/pages/deck/DeckPage.tsx b/src/pages/deck/DeckPage.tsx
index 5a5d55c..7ae1f75 100644
--- a/src/pages/deck/DeckPage.tsx
+++ b/src/pages/deck/DeckPage.tsx
@@ -14,11 +14,12 @@ import {generateGrowChart} from './document/media/generateGrowChart';
export const DeckPage: ReactFCC = () => {
const deckId = useUrlParam(DECK_PAGE_PARAM, {parser: parseInt});
- // todo поставить таумаут искуственно
+ const [enabled, setEnabled] = useState(false);
+
const { data } = useDeck({
deckId: deckId ?? 0,
config: {
- enabled: !!deckId
+ enabled: !!deckId && enabled
}
});
@@ -63,6 +64,11 @@ export const DeckPage: ReactFCC = () => {
);
}, [data]);
+ useEffect(() => {
+ setTimeout(() => {
+ setEnabled(true)
+ }, 2000);
+ }, []);
return (
diff --git a/src/pages/deck/document/slides/Slide7.tsx b/src/pages/deck/document/slides/Slide7.tsx
index e28811c..a361006 100644
--- a/src/pages/deck/document/slides/Slide7.tsx
+++ b/src/pages/deck/document/slides/Slide7.tsx
@@ -3,6 +3,7 @@ import {Image, Page, StyleSheet, Text, View} from '@react-pdf/renderer';
import {bgColor, pageFontStyles, primaryColor, subtitleStyles, titleStyles} from '../shared';
import {GetDeckResponse} from '../../../../api/deck/getDeck';
import {ExtractArray} from '../../../../utils/types';
+import {BACKEND_URL} from '../../../../config';
export interface Slide7Props {
data: ExtractArray
['data'];
@@ -35,12 +36,20 @@ const styles = StyleSheet.create({
subtitle: {
...subtitleStyles
},
+ image: {
+ margin: '0 auto',
+ width: 400,
+ height: 400,
+ objectFit: 'contain'
+ }
});
export const Slide7: ReactFCC = (props) => {
const { data } = props;
const money = data.find((i) => i.slug === 'money')?.answer as string;
+ const finance_model = data.find((i) => i.slug === 'finance_model')?.photos
+ const url = finance_model?.[0] ? BACKEND_URL + finance_model[0] : undefined;
return (
@@ -49,6 +58,10 @@ export const Slide7: ReactFCC = (props) => {
{money}
+
+ {url && (
+
+ )}
)
diff --git a/src/pages/deck/document/slides/Slide9.tsx b/src/pages/deck/document/slides/Slide9.tsx
index b8c0d88..231f309 100644
--- a/src/pages/deck/document/slides/Slide9.tsx
+++ b/src/pages/deck/document/slides/Slide9.tsx
@@ -1,6 +1,6 @@
import {ReactFCC} from '../../../../utils/ReactFCC';
import {Image, Page, StyleSheet, Text, View} from '@react-pdf/renderer';
-import {bgColor, pageFontStyles, primaryColor, secondaryColor, titleStyles} from '../shared';
+import {bgColor, pageFontStyles, primaryColor, titleStyles} from '../shared';
import {GetDeckResponse} from '../../../../api/deck/getDeck';
import {ExtractArray} from '../../../../utils/types';
import {BACKEND_URL} from '../../../../config';
@@ -29,7 +29,6 @@ const styles = StyleSheet.create({
margin: '8px 0 16px'
},
text: {
- width: '100%',
fontSize: '16px',
},
map: {
@@ -43,6 +42,7 @@ const styles = StyleSheet.create({
display: 'flex',
flexDirection: 'column',
gap: 16,
+ width: 200,
},
image: {
width: 200,