Set default embed color correctly
This commit is contained in:
		@@ -7,9 +7,9 @@ import { Message } from "./Message";
 | 
				
			|||||||
import { Settings } from "./Settings";
 | 
					import { Settings } from "./Settings";
 | 
				
			||||||
import { ReminderContext } from "./ReminderContext";
 | 
					import { ReminderContext } from "./ReminderContext";
 | 
				
			||||||
import { useQuery } from "react-query";
 | 
					import { useQuery } from "react-query";
 | 
				
			||||||
import { useParams } from "wouter";
 | 
					 | 
				
			||||||
import "./styles.scss";
 | 
					import "./styles.scss";
 | 
				
			||||||
import { useGuild } from "../App/useGuild";
 | 
					import { useGuild } from "../App/useGuild";
 | 
				
			||||||
 | 
					import { DEFAULT_COLOR } from "./Embed";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function defaultReminder(): Reminder {
 | 
					function defaultReminder(): Reminder {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -20,7 +20,7 @@ function defaultReminder(): Reminder {
 | 
				
			|||||||
        content: "",
 | 
					        content: "",
 | 
				
			||||||
        embed_author: "",
 | 
					        embed_author: "",
 | 
				
			||||||
        embed_author_url: null,
 | 
					        embed_author_url: null,
 | 
				
			||||||
        embed_color: 0,
 | 
					        embed_color: DEFAULT_COLOR,
 | 
				
			||||||
        embed_description: "",
 | 
					        embed_description: "",
 | 
				
			||||||
        embed_fields: [],
 | 
					        embed_fields: [],
 | 
				
			||||||
        embed_footer: "",
 | 
					        embed_footer: "",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { useEffect, useState } from "preact/hooks";
 | 
					import { useState } from "preact/hooks";
 | 
				
			||||||
import { HexColorPicker } from "react-colorful";
 | 
					import { HexColorPicker } from "react-colorful";
 | 
				
			||||||
import { Modal } from "../../Modal";
 | 
					import { Modal } from "../../Modal";
 | 
				
			||||||
import { Reminder } from "../../../api";
 | 
					import { Reminder } from "../../../api";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@ function intToColor(num: number) {
 | 
				
			|||||||
    return `#${num.toString(16).padStart(6, "0")}`;
 | 
					    return `#${num.toString(16).padStart(6, "0")}`;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const DEFAULT_COLOR = 9418359;
 | 
					export const DEFAULT_COLOR = 9418359;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const Embed = () => {
 | 
					export const Embed = () => {
 | 
				
			||||||
    const [reminder, setReminder] = useReminder();
 | 
					    const [reminder, setReminder] = useReminder();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user