Init
This commit is contained in:
commit
c048377bcc
32 changed files with 4748 additions and 0 deletions
26
frontend/src/App.tsx
Normal file
26
frontend/src/App.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { MantineProvider, Container, Title, Stack } from '@mantine/core';
|
||||
import { LinkForm } from './components/LinkForm';
|
||||
import { LinkList } from './components/LinkList';
|
||||
import { Link } from './types/api';
|
||||
|
||||
function App() {
|
||||
const handleLinkCreated = (link: Link) => {
|
||||
// You could update the list here or show a success message
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
return (
|
||||
<MantineProvider withGlobalStyles withNormalizeCSS>
|
||||
<Container size="lg" py="xl">
|
||||
<Stack spacing="xl">
|
||||
<Title order={1}>URL Shortener</Title>
|
||||
<LinkForm onSuccess={handleLinkCreated} />
|
||||
<LinkList />
|
||||
</Stack>
|
||||
</Container>
|
||||
</MantineProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue