Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AppElent committed Dec 17, 2024
1 parent a46d5b1 commit 2868e5b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .templatesyncignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ package-lock.json
src/config

.github/workflows

index.html
package.json
src/layouts/paperbase/Header.jsx
tsconfig.app.tsbuildinfo
tsconfig.node.tsbuildinfo
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
sizes="180x180"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Recipes</title>
<title>Appelent Template</title>
</head>
<body>
<div id="root"></div>
Expand Down
19 changes: 0 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
import ScrollToTop from '@/components/default/scroll-to-top';
import '@/config/firebase';
import { db } from '@/config/firebase';
import routes from '@/config/routes';
import { FirebaseAuthProvider } from '@/libs/auth';
import FirestoreDataSource from '@/libs/data-sources/data-sources/FirestoreDataSource';
import LocalStorageDataSource from '@/libs/data-sources/data-sources/LocalStorageDataSource';

import { recipeYupSchema } from '@/schemas/recipe';
import theme from '@/theme/paperbase/theme';
import './App.css';
import config from './config';
import { getPath } from './config/paths';
import Dashboard from './Dashboard';
import { Recipe } from './schemas/recipe';

const firebaseProvider = new FirebaseAuthProvider({
login: getPath('login').to,
logout: '/logout',
});

const devFilter = import.meta.env.DEV ? 'ja' : 'ZMG16rhpzbdKd8LXUIiNOD7Jul23';

const dataSources = {
recipes: new FirestoreDataSource<Recipe>(
{
target: 'recipes',
targetMode: 'collection',
YupValidationSchema: recipeYupSchema,
subscribe: true,
targetFilter: {
filters: [{ field: 'owner', operator: '!=', value: devFilter }],
orderBy: [{ field: 'name', direction: 'asc' }],
},
},
{ db }
),
settings: new LocalStorageDataSource({ target: 'settings', targetMode: 'document' }),
};

Expand Down
7 changes: 3 additions & 4 deletions src/layouts/paperbase/Navigator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function Navigator(props) {
mainItems.reduce((acc, { id, collapsed }) => ({ ...acc, [id]: collapsed ?? false }), {})
);

console.log(open);
const title = config?.meta?.title;
const { t } = useTranslation();

Expand Down Expand Up @@ -119,16 +118,16 @@ export default function Navigator(props) {
key={id}
sx={{ bgcolor: '#101F33' }}
>
<ListItem
<ListItemButton
sx={{ py: 2, px: 3 }}
button
// button
onClick={() => handleClick(id)}
>
<ListItemText sx={{ color: '#fff' }}>
{translationKey ? t(translationKey, { defaultValue: label }) : label}
</ListItemText>
{open[id] ? <ExpandLess color="primary" /> : <ExpandMore color="primary" />}
</ListItem>
</ListItemButton>
<Collapse
in={!open[id]}
timeout="auto"
Expand Down
7 changes: 6 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import './index.css';
createRoot(document.getElementById('root')!).render(
// <StrictMode>
<HelmetProvider>
<BrowserRouter>
<BrowserRouter
future={{
v7_relativeSplatPath: true,
v7_startTransition: true,
}}
>
<App />
</BrowserRouter>
</HelmetProvider>
Expand Down

0 comments on commit 2868e5b

Please sign in to comment.