Skip to content

Commit

Permalink
Update about page, remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawajs committed Jun 17, 2024
1 parent a60d14d commit 4774be7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export class InstitutionsDocumentService implements IInstitutionsService {
const cacheKey = `${CACHE_KEY}_${ids.join('_')}`;
const cacheData = await this.cacheManager.get(cacheKey) as InstitutionDto[];
if (cacheData) {
console.log('Cache hit');
return Promise.resolve(cacheData);
}

Expand Down
Binary file added src/nursery-nav/public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/nursery-nav/src/components/Comparison/Comparison.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default function Comparison({ ids }: ComparisonProps) {
const fetchInstitution = async () => {
const response = await fetch(`${process.env.REACT_APP_API_URL}/institutions/details?id=${ids.join('&id=')}`);
const institutionsDto = await response.json() as Institution[];
console.log(institutionsDto);
const institutionsToCompare: InstitutionToCompare[] = institutionsDto.map((institution: Institution) => {
const institutionToCompare: InstitutionToCompare = {
id: institution.id,
Expand All @@ -46,7 +45,6 @@ export default function Comparison({ ids }: ComparisonProps) {
};
return institutionToCompare;
});
console.log(institutionsToCompare);
setInstitutions(institutionsToCompare);
};
fetchInstitution();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,12 @@ function PriceWithLabel(label: string, icon: PropTypes.ReactComponentLike, color
export default function InstitutionDetailsHeader(institution: Institution) {
const mainColor = institution.institutionType === InstitutionType.NURSERY ? 'primary' : 'secondary';
const institutionType = institution.institutionType === InstitutionType.NURSERY ? 'ŻŁOBEK' : 'KLUB DZIECIĘCY';
const imagePath = institution.institutionType === InstitutionType.NURSERY ? '/images/nursery-placeholder.jpg' : '/images/child-club-placeholder.jpg';
const backgroundColor = mainColor + '.light';

return (
<Box p={2}>
<Paper elevation={2} sx={{ padding: 0 }}>
<Box>
<Box pb={0} height='10rem'>
<img
src={imagePath}
alt="Created by DALL-E from OpenAI"
style={{ width: '100%', height: '100%', objectFit: 'cover', borderTopLeftRadius: '5px', borderTopRightRadius: '5px' }}
/>
</Box>
<Paper elevation={0} sx={{ backgroundColor: backgroundColor }}>
<Stack direction='row' justifyContent='flex-start' spacing={1} pt={2}>
<Chip label={institutionType} color={mainColor} />
Expand Down
12 changes: 11 additions & 1 deletion src/nursery-nav/src/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function AboutPage() {
<Paper elevation={3} sx={{ padding: '1rem' }}>
<Stack direction="column" spacing={2}>
<Box justifyItems={'center'} textAlign={'center'}>
<img src="/logo512.png" alt={process.env.REACT_APP_NAME} width="200px" height="200px" />
<img src="/images/logo.png" alt={process.env.REACT_APP_NAME} width="200px" />
</Box>
<Typography variant="h1" textAlign={'center'}>O projekcie</Typography>
<Typography variant="body1">
Expand All @@ -40,6 +40,9 @@ export default function AboutPage() {
<ListItem>
<ListItemText><strong>Szczegóły instytucji:</strong> Informacje o wybranej placówce.</ListItemText>
</ListItem>
<ListItem>
<ListItemText><strong>Porównanie instytucji:</strong> Porównanie cech wybranych placówek.</ListItemText>
</ListItem>
<ListItem>
<ListItemText><strong>Integracja z API:</strong> API z bieżąco aktualizowaną bazą danych</ListItemText>
</ListItem>
Expand All @@ -50,6 +53,13 @@ export default function AboutPage() {
Projekt wykorzystuje technologie takie jak React, Typescript, NestJS, oraz biblioteki MUI i React Leaflet.
Kod źródłowy aplikacji dostępny jest pod adresem URL: <Link href="https://github.com/kubawajs/nursery-nav">github.com/kubawajs/nursery-nav</Link>.
</Typography>
<Typography variant="h2" typography="h3" textAlign={'center'}>Dane</Typography>
<Typography variant="body1">
Projekt wykorzystuje dane z serwisu Otwarte Dane.
</Typography>
<Typography variant="body1">
Źródło: <Link href="https://dane.gov.pl/pl/dataset/2106,rejestr-zobkow-lista-instytucji">Rejestr Żłobków - lista instytucji</Link>.
</Typography>
<Typography variant="h2" typography="h3" textAlign={'center'}>Autor</Typography>
<Box justifyItems={'center'} textAlign={'center'}>
<Link href="www.wajs-dev.net"><img src="/author.png" alt="Author's logo" width="150px" height="150px" /></Link>
Expand Down

0 comments on commit 4774be7

Please sign in to comment.