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;
|
||||
|
||||
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile || user.id === UserStore.getCurrentUser().id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const [timezone, setTimezone] = React.useState<string | null>(null);
|
||||
|
||||
React.useEffect(() => {
|
||||
getUserTimezone(user.id).then(timezone => setTimezone(timezone));
|
||||
}, [user.id]);
|
||||
|
||||
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile || user.id === UserStore.getCurrentUser().id || !timezone) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<span style={{
|
||||
position: "absolute",
|
||||
top: "110px",
|
||||
top: "10px",
|
||||
right: "10px",
|
||||
zIndex: 5,
|
||||
background: "white",
|
||||
borderRadius: "5px",
|
||||
border: "4px solid white"
|
||||
}}>
|
||||
{timezone && getTimeString(timezone)}
|
||||
{getTimeString(timezone)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue