Skip to content

Commit

Permalink
replace signal with props
Browse files Browse the repository at this point in the history
  • Loading branch information
dhcmrlchtdj committed May 24, 2024
1 parent 60640c1 commit fc00be2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion ui/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export const App = () => {
return (
<div class="container grid-sm">
<div class="columns">
<Heading loaded={loaded.value} />
<Heading
email={email.value}
loaded={loaded.value}
/>
<Add />
<List />
</div>
Expand Down
6 changes: 2 additions & 4 deletions ui/src/components/heading.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { email } from "../shared/state"

const logout = () => {
const sw = navigator.serviceWorker
if (sw && sw.controller) {
sw.controller.postMessage("logout")
}
}

export const Heading = (props: { loaded: boolean }) => {
export const Heading = (props: { email: string; loaded: boolean }) => {
return (
<>
<div class="column col-12">
Expand All @@ -21,7 +19,7 @@ export const Heading = (props: { loaded: boolean }) => {
}}
></span>
<span>&nbsp;</span>
<span>{email}</span>
<span>{props.email}</span>
<span>&nbsp;</span>
<a
href="/api/v1/feeds/export"
Expand Down

0 comments on commit fc00be2

Please sign in to comment.