mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-25 07:48:32 +00:00
better
This commit is contained in:
parent
81a191cae4
commit
3bd2ca3357
1 changed files with 6 additions and 6 deletions
|
@ -132,27 +132,27 @@ export default definePlugin({
|
||||||
|
|
||||||
const user = e.user as User;
|
const user = e.user as User;
|
||||||
|
|
||||||
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile || user.id === UserStore.getCurrentUser().id) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [timezone, setTimezone] = React.useState<string | null>(null);
|
const [timezone, setTimezone] = React.useState<string | null>(null);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
getUserTimezone(user.id).then(timezone => setTimezone(timezone));
|
getUserTimezone(user.id).then(timezone => setTimezone(timezone));
|
||||||
}, [user.id]);
|
}, [user.id]);
|
||||||
|
|
||||||
|
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile || user.id === UserStore.getCurrentUser().id || !timezone) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span style={{
|
<span style={{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: "110px",
|
top: "10px",
|
||||||
right: "10px",
|
right: "10px",
|
||||||
zIndex: 5,
|
zIndex: 5,
|
||||||
background: "white",
|
background: "white",
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
border: "4px solid white"
|
border: "4px solid white"
|
||||||
}}>
|
}}>
|
||||||
{timezone && getTimeString(timezone)}
|
{getTimeString(timezone)}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue