initial commit

This commit is contained in:
2024-06-09 14:52:51 +02:00
parent a71467fec5
commit c1b817a128
21 changed files with 8371 additions and 51 deletions

View File

@@ -1,41 +1,18 @@
import type { MetaFunction } from "@remix-run/node";
import { json, MetaFunction } from '@remix-run/node'
import { vacanciesService } from '~/services/vacancies/vacancies.service'
import { useLoaderData } from '@remix-run/react'
import { VacanciesChart } from '~/components/vacancies-chart'
export const meta: MetaFunction = () => {
return [
{ title: "New Remix App" },
{ name: "description", content: "Welcome to Remix!" },
];
};
return [{ title: 'New Remix App' }, { name: 'description', content: 'Welcome to Remix!' }]
}
export const loader = async () => {
const vacancies = await vacanciesService.getAggregateByCreatedAt()
return json({ vacancies })
}
export default function Index() {
return (
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
<h1>Welcome to Remix</h1>
<ul>
<li>
<a
target="_blank"
href="https://remix.run/start/quickstart"
rel="noreferrer"
>
5m Quick Start
</a>
</li>
<li>
<a
target="_blank"
href="https://remix.run/start/tutorial"
rel="noreferrer"
>
30m Tutorial
</a>
</li>
<li>
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
Remix Docs
</a>
</li>
</ul>
</div>
);
const { vacancies } = useLoaderData<typeof loader>()
return <VacanciesChart data={vacancies} />
}