chore: add all the code from original repo

This commit is contained in:
Riccardo
2024-05-23 16:55:29 +02:00
parent d8f9a215eb
commit 85d66215a7
66 changed files with 16668 additions and 122 deletions

View File

@@ -0,0 +1,33 @@
import { ProfileContext } from '@/contexts/ProfileContext';
import { Card, Paper, Stack } from '@mui/material';
import { nanoid } from 'nanoid';
import { useContext, useEffect, useState } from 'react';
import ProfilesTable from './Profiles/ProfilesTable';
import TagsTable from './Tags/TagsTable';
export default function Settings() {
const { profile, setProfile } = useContext(ProfileContext);
const [formKey, setFormKey] = useState(() => nanoid());
useEffect(() => {
if (profile) {
setFormKey(nanoid());
}
}, [profile]);
return (
<Paper sx={{ width: '100%', height: 'calc(100vh - 50px)' }}>
<Stack direction="row" spacing={2} padding={2}>
<Card sx={{ width: '50%', height: '100%' }}>
<ProfilesTable
selectedProfile={profile}
setSelectedProfile={setProfile}
/>
</Card>
<Card sx={{ width: '50%', height: '100%' }}>
<TagsTable key={formKey} selectedProfile={profile} />
</Card>
</Stack>
</Paper>
);
}