Skip to content

Commit

Permalink
refactor: file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
KonecnyDavid committed Aug 5, 2024
1 parent dca4966 commit 0bff4b3
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: install frontend dependencies
run: yarn install # change this to npm, pnpm or bun depending on which one you use.

- uses: tauri-apps/tauri-action@v0
- uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import AgendaHour from "./AgendaHour.tsx";
import useTime from "../../hooks/useTime.ts";
import useTime from "../../../hooks/useTime.ts";
import AgendaEvent, {Event} from "./AgendaEvent.tsx";
import CurrentHour from "./CurrentHour.tsx";
import useAgendaHours from "../../hooks/useAgendaHours.ts";
import useAgendaHours from "../../../hooks/useAgendaHours.ts";
import {useEffect, useRef} from "react";

const precomputeHours = 12;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {getPosition} from "./Agenda.tsx";
import {HOUR_WIDTH} from "./AgendaHour.tsx";
import {formatTime} from "../../utils/format.ts";
import {formatTime} from "../../../utils/format.ts";
import {twMerge} from "tailwind-merge";
import {useSetDialog} from "../../contexts/DialogContextProvider.tsx";
import {useSetDialog} from "../../../contexts/DialogContextProvider.tsx";
import ConfirmIdentityDialog from "../../dialog/ConfirmIdentityDialog.tsx";

export interface Event {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {formatTime} from "../../utils/format.ts";
import {formatTime} from "../../../utils/format.ts";

export const HOUR_WIDTH = 70;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useMemo} from "react";
import {getPosition} from "./Agenda.tsx";
import {formatTime} from "../../utils/format.ts";
import {formatTime} from "../../../utils/format.ts";

interface CurrentHourProps {
agendaFrom: Date;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/components/dialog/ConfirmIdentityDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react'
import {useSetDialog} from "../contexts/DialogContextProvider.tsx";
import Button from "../buttons/Button.tsx";
import TextInput from "../form/TextInput.tsx";
import {useSetDialog} from "../../contexts/DialogContextProvider.tsx";
import Button from "../primitives/buttons/Button.tsx";
import TextInput from "../primitives/form/TextInput.tsx";
import {useNavigate} from "react-router-dom";
import {Event} from "../layout/Agenda/AgendaEvent.tsx";
import {Event} from "../blocks/Agenda/AgendaEvent.tsx";


export default function Example({reservation}: { reservation: Event }) {
Expand Down
9 changes: 7 additions & 2 deletions src/components/layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import SideMenu from "./SideMenu/SideMenu.tsx";
import {Outlet} from "react-router-dom";
import DialogContextProvider from "../contexts/DialogContextProvider.tsx";
import {Navigate, Outlet, useLocation} from "react-router-dom";
import DialogContextProvider from "../../contexts/DialogContextProvider.tsx";

const Layout = () => {
const location = useLocation();

if (location.pathname == "/")
return <Navigate to="/agenda" />

return (
<DialogContextProvider>
<div className="grid grid-cols-12 grid-rows-12 h-screen w-screen gap-6 relative p-6">
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/SideMenu/CurrentTime.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Fragment} from "react";
import useTime from "../../hooks/useTime.ts";
import useTime from "../../../hooks/useTime.ts";

const CurrentTime = () => {
const time = useTime();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/Agenda.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Section from "../components/layout/Section/Section.tsx";
import Agenda from "../components/layout/Agenda/Agenda.tsx";
import Agenda from "../components/blocks/Agenda/Agenda.tsx";

const AgendaPage = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Reservation.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Section from "../components/layout/Section/Section.tsx";
import ReservationInfo from "../components/layout/Reservation/ReservationInfo.tsx";
import Experiments from "../components/layout/Reservation/Experiments/Experiments.tsx";
import ReservationInfo from "../components/blocks/Reservation/ReservationInfo.tsx";
import Experiments from "../components/blocks/Reservation/Experiments/Experiments.tsx";

const ReservationPage = () => {
return (
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 0bff4b3

Please sign in to comment.