Refactor user info properties to use snake_case naming convention
This commit is contained in:
parent
808420e601
commit
e04660b93b
17
src/App.tsx
17
src/App.tsx
@ -1,6 +1,5 @@
|
|||||||
import { useMemo, useState, useEffect } from "react";
|
import { useMemo, useState, useEffect } from "react";
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
|
||||||
const [version, setVersion] = useState('');
|
|
||||||
type Status =
|
type Status =
|
||||||
| "ready"
|
| "ready"
|
||||||
| "saved successfully"
|
| "saved successfully"
|
||||||
@ -13,11 +12,11 @@ type Status =
|
|||||||
| string;
|
| string;
|
||||||
|
|
||||||
interface UserInfo {
|
interface UserInfo {
|
||||||
userId: string | null;
|
user_id: string | null;
|
||||||
discordId: string | null;
|
discord_id: string | null;
|
||||||
epicId: string | null;
|
epic_id: string | null;
|
||||||
username: string | null;
|
username: string | null;
|
||||||
globalName: string | null;
|
global_name: string | null;
|
||||||
logins?: number;
|
logins?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +244,7 @@ export default function App() {
|
|||||||
async function inject() {
|
async function inject() {
|
||||||
setStatus("injecting...");
|
setStatus("injecting...");
|
||||||
try {
|
try {
|
||||||
const res = await tryInvoke<string>("inject_dll", { discordId: userData?.discordId });
|
const res = await tryInvoke<string>("inject_dll", { discordId: userData?.discord_id });
|
||||||
setLastLog(res || "Successfully Injected!");
|
setLastLog(res || "Successfully Injected!");
|
||||||
setStatus("Successfully Injected!");
|
setStatus("Successfully Injected!");
|
||||||
window.setTimeout(() => setStatus("ready"), 1400);
|
window.setTimeout(() => setStatus("ready"), 1400);
|
||||||
@ -394,9 +393,9 @@ export default function App() {
|
|||||||
<main className="panel-wrap">
|
<main className="panel-wrap">
|
||||||
<header className="welcome-section">
|
<header className="welcome-section">
|
||||||
<h2 className="welcome-text">
|
<h2 className="welcome-text">
|
||||||
Welcome, <span className="neon-text-soft">{userData?.globalName || userData?.username || "User"}</span>
|
Welcome, <span className="neon-text-soft">{userData?.global_name || userData?.username || "User"}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<div className="user-id-badge">User #{userData?.userId || "0"}</div>
|
<div className="user-id-badge">User #{userData?.user_id || "0"}</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section className="glass-card neon-ring">
|
<section className="glass-card neon-ring">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user