Skip to content

Commit 6798957

Browse files
committed
feat: document Notion usage
1 parent 6402fc9 commit 6798957

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/App.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ export const App = () => {
8787
sessions: updatedSessions,
8888
}
8989
window.location.assign(
90-
`${document.location.href.replace(
91-
/#.+/,
92-
'',
93-
)}#${encodeURIComponent(btoa(JSON.stringify(cfg)))}`,
90+
`${
91+
new URL(document.location.href).origin
92+
}#${encodeURIComponent(btoa(JSON.stringify(cfg)))}`,
9493
)
9594
setEditing(false)
9695
}}
@@ -177,6 +176,17 @@ export const App = () => {
177176
Click the <LockIcon /> icon to create your own schedule. When done,
178177
click the <UnLockIcon /> and share the updated URL.
179178
</p>
179+
<p>
180+
<a href="https://www.notion.so/">Notion</a> user? Use{' '}
181+
<a
182+
href={`${
183+
new URL(document.location.href).origin
184+
}?schedule=${encodeURIComponent(btoa(JSON.stringify(cfg)))}`}
185+
>
186+
this URL
187+
</a>{' '}
188+
to embed it on any page.
189+
</p>
180190
</Info>
181191
</Main>
182192
<Footer />

src/style/Main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export const Info = styled.div`
99
margin: 1rem;
1010
display: flex;
1111
justify-content: center;
12+
flex-direction: column;
13+
a {
14+
color: ${(props) => props.theme.colors.text};
15+
}
1216
`
1317

1418
export const Headline = styled.h1`

0 commit comments

Comments
 (0)