diff --git a/reminder-dashboard/src/components/Reminder/Avatar.tsx b/reminder-dashboard/src/components/Reminder/Avatar.tsx
new file mode 100644
index 0000000..61127ed
--- /dev/null
+++ b/reminder-dashboard/src/components/Reminder/Avatar.tsx
@@ -0,0 +1,28 @@
+import { ImagePicker } from "./ImagePicker";
+import { useReminder } from "./ReminderContext";
+import { useGuild } from "../App/useGuild";
+
+export const Avatar = () => {
+ const guild = useGuild();
+ const [reminder, setReminder] = useReminder();
+
+ return guild ? (
+ {
+ setReminder((reminder) => ({
+ ...reminder,
+ avatar: url,
+ }));
+ }}
+ >
+ ) : (
+
+ );
+};
diff --git a/reminder-dashboard/src/components/Reminder/Message.tsx b/reminder-dashboard/src/components/Reminder/Message.tsx
index 1b9ba10..07e7e7a 100644
--- a/reminder-dashboard/src/components/Reminder/Message.tsx
+++ b/reminder-dashboard/src/components/Reminder/Message.tsx
@@ -1,38 +1,23 @@
-import { ImagePicker } from "./ImagePicker";
import { Username } from "./Username";
import { Content } from "./Content";
import { Embed } from "./Embed";
-import { useReminder } from "./ReminderContext";
+import { Avatar } from "./Avatar";
-export const Message = () => {
- const [reminder, setReminder] = useReminder();
-
- return (
-
-
-
-
+);
diff --git a/reminder-dashboard/src/components/Reminder/Username.tsx b/reminder-dashboard/src/components/Reminder/Username.tsx
index 8e2d87a..4edcea2 100644
--- a/reminder-dashboard/src/components/Reminder/Username.tsx
+++ b/reminder-dashboard/src/components/Reminder/Username.tsx
@@ -1,9 +1,11 @@
import { useReminder } from "./ReminderContext";
+import { useGuild } from "../App/useGuild";
export const Username = () => {
+ const guild = useGuild();
const [reminder, setReminder] = useReminder();
- return (
+ return guild ? (
+ ) : (
+
);
};
diff --git a/reminder-dashboard/src/components/Sidebar/index.tsx b/reminder-dashboard/src/components/Sidebar/index.tsx
index 26c1570..4003e00 100644
--- a/reminder-dashboard/src/components/Sidebar/index.tsx
+++ b/reminder-dashboard/src/components/Sidebar/index.tsx
@@ -4,16 +4,19 @@ import { MobileSidebar } from "./MobileSidebar";
import { Brand } from "./Brand";
import { Wave } from "./Wave";
import { GuildEntry } from "./GuildEntry";
-import { fetchUserGuilds, GuildInfo } from "../../api";
+import { fetchUserGuilds, fetchUserInfo, GuildInfo } from "../../api";
import { TimezonePicker } from "../TimezonePicker";
import "./styles.scss";
+import { Link, useLocation } from "wouter";
type ContentProps = {
guilds: GuildInfo[];
};
const SidebarContent = ({ guilds }: ContentProps) => {
- const guildEntries = guilds.map((guild) => );
+ const guildEntries = guilds.map((guild) => );
+ const [loc] = useLocation();
+ const { data: userInfo } = useQuery({ ...fetchUserInfo() });
return (
<>
@@ -22,6 +25,19 @@ const SidebarContent = ({ guilds }: ContentProps) => {