mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-09-12 14:51:09 +02:00
Attempt to use react router the way it was meant to
This commit is contained in:
parent
4aad98256a
commit
55c021796e
3 changed files with 63 additions and 57 deletions
|
@ -10,6 +10,7 @@ export const topicUrlJsonPollWithSince = (baseUrl, topic, since) => `${topicUrlJ
|
|||
export const topicUrlAuth = (baseUrl, topic) => `${topicUrl(baseUrl, topic)}/auth`;
|
||||
export const topicShortUrl = (baseUrl, topic) => shortUrl(topicUrl(baseUrl, topic));
|
||||
export const shortUrl = (url) => url.replaceAll(/https?:\/\//g, "");
|
||||
export const expandUrl = (url) => [`https://${url}`, `http://${url}`];
|
||||
|
||||
export const validUrl = (url) => {
|
||||
return url.match(/^https?:\/\//);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue