Skip to content

Commit

Permalink
Fixed changes by Marcin!
Browse files Browse the repository at this point in the history
  • Loading branch information
burtonator committed Oct 7, 2024
1 parent 282beea commit a1aeec1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions packages/commonwealth/client/scripts/hooks/useDraft.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
const MAX_DRAFT_SIZE = 1024 * 1024 * 4;

type DraftOpts = {
keyVersion?: string;
keyVersion: string;
};

export function useDraft<T>(key: string, opts: DraftOpts = {}) {
const keyVersion = opts.keyVersion ?? 'v2';
export function useDraft<T>(
key: string,
opts: DraftOpts = { keyVersion: 'v2' },
) {
const keyVersion = opts.keyVersion;
const prefix = `cw-draft-${keyVersion}`;

const fullKey = `${prefix}-${key}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const QuillPage = () => {
return (
<ReactQuillEditor
contentDelta=""
tooltipLabel="thisis the tooltip"
tooltipLabel="this is the tooltip"
isDisabled={true}
setContentDelta={() => console.log('got delta')}
/>
Expand Down

0 comments on commit a1aeec1

Please sign in to comment.