mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-25 08:46:25 +00:00
refactor(betterSettings): re-use ActivityViewProps type
This commit is contained in:
parent
3be954f713
commit
f78c9ce608
2 changed files with 3 additions and 9 deletions
|
@ -24,7 +24,7 @@ import { Devs } from "@utils/constants";
|
|||
import definePlugin from "@utils/types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { PresenceStore, React, Tooltip, useStateFromStores } from "@webpack/common";
|
||||
import { Guild, User } from "discord-types/general";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import ActivityTooltip from "./components/ActivityTooltip";
|
||||
import { Caret } from "./components/Caret";
|
||||
|
@ -38,13 +38,7 @@ import {
|
|||
|
||||
const cl = classNameFactory("vc-bactivities-");
|
||||
|
||||
const ActivityView = findComponentByCodeLazy<{
|
||||
activity: Activity | null;
|
||||
user: User;
|
||||
guild: Guild;
|
||||
channelId: string;
|
||||
onClose: () => void;
|
||||
}>("onOpenGameProfile:");
|
||||
const ActivityView = findComponentByCodeLazy<ActivityViewProps>("onOpenGameProfile:");
|
||||
|
||||
// if discord one day decides to change their icon this needs to be updated
|
||||
const DefaultActivityIcon = findComponentByCodeLazy("M6,7 L2,7 L2,6 L6,6 L6,7 Z M8,5 L2,5 L2,4 L8,4 L8,5 Z M8,3 L2,3 L2,2 L8,2 L8,3 Z M8.88888889,0 L1.11111111,0 C0.494444444,0 0,0.494444444 0,1.11111111 L0,8.88888889 C0,9.50253861 0.497461389,10 1.11111111,10 L8.88888889,10 C9.50253861,10 10,9.50253861 10,8.88888889 L10,1.11111111 C10,0.494444444 9.5,0 8.88888889,0 Z");
|
||||
|
|
|
@ -83,7 +83,7 @@ export interface IconCSSProperties extends CSSProperties {
|
|||
}
|
||||
|
||||
export interface ActivityViewProps {
|
||||
activity: Activity;
|
||||
activity: Activity | null;
|
||||
user: User;
|
||||
guild: Guild;
|
||||
channelId: string;
|
||||
|
|
Loading…
Reference in a new issue