Updates
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { AceEditorAcceptedModes } from "@/components/general/data/partials/EditDataListButton";
|
||||
import React, { MutableRefObject } from "react";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
@@ -9,7 +8,7 @@ export type AceEditorComponentType = {
|
||||
ctrlEnterFn?: (editor: AceAjax.Editor) => void;
|
||||
content?: string;
|
||||
placeholder?: string;
|
||||
mode?: AceEditorAcceptedModes;
|
||||
mode?: any;
|
||||
fontSize?: string;
|
||||
previewMode?: boolean;
|
||||
onChange?: (value: string) => void;
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from "react";
|
||||
import Link from "../layout/Link";
|
||||
import Divider from "../layout/Divider";
|
||||
import Row from "../layout/Row";
|
||||
import lowerToTitleCase from "@/server-client-shared/utils/lower-to-title-case";
|
||||
import lowerToTitleCase from "../utils/lower-to-title-case";
|
||||
|
||||
type LinkObject = {
|
||||
title: string;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { AuthCsrfHeaderName } from "@/server-client-shared/types/admin/auth";
|
||||
import _ from "lodash";
|
||||
|
||||
type FetchApiOptions = {
|
||||
@@ -18,7 +17,7 @@ type FetchApiOptions = {
|
||||
};
|
||||
|
||||
type FetchHeader = HeadersInit & {
|
||||
[key in AuthCsrfHeaderName]?: string | null;
|
||||
[key: string]: string | null;
|
||||
};
|
||||
|
||||
export type FetchApiReturn = {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export default function lowerToTitleCase(str: string) {
|
||||
return str
|
||||
.replace(/_|-/g, " ")
|
||||
.split(" ")
|
||||
.map(
|
||||
(word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
||||
)
|
||||
.join(" ");
|
||||
}
|
||||
Reference in New Issue
Block a user