1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 07:39:41 +02:00

Feature/UI updates (#990)

* titleCase utility

* update rules ui

* order by date_added

* fix error on page refresh

* fix health checks

* fix cookbook return values
This commit is contained in:
Hayden 2022-02-22 15:32:13 -09:00 committed by GitHub
parent 177a430d8c
commit 2211174636
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 20 deletions

View file

@ -4,6 +4,13 @@ export const useAsyncKey = function () {
return String(Date.now());
};
export const titleCase = function (str: string) {
return str
.split(" ")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ");
};
export function detectServerBaseUrl(req?: IncomingMessage | null) {
if (!req || req === undefined) {
return "";