Skip to content

Commit

Permalink
tweak: marketplace & db stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Jan 19, 2024
1 parent 984c060 commit 066e6a7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import makeStyles from '@mui/styles/makeStyles';
import { Typography, Paper } from '@mui/material';
import { ListItem } from '@ui/components/ListItem';
import { PictureResponsive } from '@ui/components/PictureResponsive';
import { MarketplaceListing } from '@typings/marketplace';
Expand Down Expand Up @@ -48,35 +47,35 @@ export const MarketplaceItem: React.FC<MarketplaceListing> = ({ children, ...lis

return (
<ListItem className={classes.root}>
<div className={classes.content}>
<Paper variant="outlined" className={classes.paper}>
<div className="flex w-full flex-col">
<div className="mb-4 flex h-auto flex-col overflow-auto rounded border dark:border-neutral-800 dark:bg-neutral-900">
<div style={{ margin: 10 }}>
<Typography style={{ margin: 5 }} variant="h5">
<h2 style={{ margin: 5 }} className="text-sm dark:text-neutral-50">
{listing.name}
</Typography>
<Typography variant="h5" style={{ padding: 5 }}>
</h2>
<p style={{ padding: 5 }} className="text-base font-medium text-neutral-400">
{listing.title}
</Typography>
</p>
</div>

{listing.url ? (
<PictureReveal>
<PictureResponsive src={listing.url} alt={`${listing.name}`} />
</PictureReveal>
) : (
<Typography style={{ margin: 10 }}>
<p className="p-4 text-sm dark:text-red-400">
{t('MARKETPLACE.NO_IMAGE')}
<span role="img" aria-label="emoji">
🙁
:(
</span>
</Typography>
</p>
)}

<Typography variant="body1" className={classes.listingContent}>
<p className="max-w-full break-words p-4 text-sm dark:text-neutral-50">
{listing.description}
</Typography>
</p>
<ListingActions {...listing} />
</Paper>
</div>
</div>
</ListItem>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/phone/src/apps/marketplace/hooks/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const defaultData: MarketplaceListing[] = [
title: 'eeeeeeeeeeeeeeeeeeeeeeeee',
description:
'skldfsdEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE',
url: 'https://i.file.glass/706Y3.jpeg',
url: 'https://i.fivemanage.com/images/XrjtfSCOCgOKVkbskxCU1vLrQrqXasaNli6VAMuk.png',
},
{
id: 2,
Expand Down
14 changes: 12 additions & 2 deletions apps/phone/src/apps/notes/list/NoteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ const NoteList = () => {
<List disablePadding>
{notes.map((note) => (
<ListItem key={note.id} button divider onClick={() => handleNoteModal(note)}>
<ListItemText>{<Typography style={{ color: phoneTheme.palette.text.primary }}>{note.title}</Typography>}</ListItemText>
<ListItemText>
{
<Typography style={{ color: phoneTheme.palette.text.primary }}>
{note.title}
</Typography>
}
</ListItemText>
</ListItem>
))}
</List>
Expand All @@ -50,7 +56,11 @@ const NoteList = () => {
flexDirection="column"
height="100%"
>
<Typography color="inherit" variant="h6" style={{ fontWeight: 300, color: phoneTheme.palette.text.primary }}>
<Typography
color="inherit"
variant="h6"
style={{ fontWeight: 300, color: phoneTheme.palette.text.primary }}
>
{t('NOTES.FEEDBACK.NO_NOTES')}
</Typography>
</Box>
Expand Down
7 changes: 6 additions & 1 deletion packages/database/src/db/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ export function generateConnectionPool() {
}, {});

return mysql.createPool({
connectTimeout: 60000,
...config,
connectTimeout: 60000,
host: config.host,
database: config.database,
port: parseInt(config.port as string, 10),
user: config.user,
password: config.password,
});
} catch (e) {
mainLogger.error(`SQL Connection Pool Error: ${e.message}`, {
Expand Down

0 comments on commit 066e6a7

Please sign in to comment.