Skip to content

Commit

Permalink
Move code around
Browse files Browse the repository at this point in the history
  • Loading branch information
mjarkk committed Jul 13, 2024
1 parent d69267e commit de417fb
Show file tree
Hide file tree
Showing 11 changed files with 255 additions and 238 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/assets/index-DfaSzkZ3.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/index-YpumvgGr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
color: white;
}
</style>
<script type="module" crossorigin src="/assets/index-DfaSzkZ3.js"></script>
<script type="module" crossorigin src="/assets/index-YpumvgGr.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BfofDsXp.css">
</head>
<body>
Expand Down
18 changes: 9 additions & 9 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import {
onMount,
} from "solid-js"
import type { EmailBase } from "../email"
import { EmailsList, EmailsListProps } from "./EmailRow"
import { Overview, OverviewProps } from "./overview/Overview"
import type { Accessor, Setter } from "solid-js"
import { EmailEventsWebsocket } from "../services/websocket"
import { fetch } from "../services/fetch"

const Email = lazy(() =>
import("./show/Email").then((m) => ({ default: m.Email })),
const Show = lazy(() =>
import("./show/Show").then((m) => ({ default: m.Show })),
)

interface SelectedEmailActions {
Expand Down Expand Up @@ -125,7 +125,7 @@ export function App() {
<div h-full w-full overflow-hidden>
<Switch
fallback={
<EmailsList
<Overview
emails={() => emails() ?? []}
loading={() => !emails()}
/>
Expand All @@ -134,7 +134,7 @@ export function App() {
<Match
when={emails() !== undefined && selectedEmail() !== undefined}
>
<LayoutWithEmail
<LeftOverviewRightEmail
emails={emails}
selectedEmail={() => selectedEmail()!}
/>
Expand All @@ -146,11 +146,11 @@ export function App() {
)
}

interface LayoutWithEmailProps extends EmailsListProps {
interface LeftOverviewRightEmailProps extends OverviewProps {
selectedEmail: Accessor<EmailBase>
}

function LayoutWithEmail({ emails }: LayoutWithEmailProps) {
function LeftOverviewRightEmail({ emails }: LeftOverviewRightEmailProps) {
return (
<div flex items-stretch>
<div
Expand All @@ -163,10 +163,10 @@ function LayoutWithEmail({ emails }: LayoutWithEmailProps) {
border-r-solid
border-zinc-700
>
<EmailsList emails={emails} />
<Overview emails={emails} />
</div>
<div h-screen overflow-y-auto self-stretch flex-1>
<Email />
<Show />
</div>
</div>
)
Expand Down
222 changes: 0 additions & 222 deletions src/components/EmailRow.tsx

This file was deleted.

Loading

0 comments on commit de417fb

Please sign in to comment.