fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
import { UserRelay } from '@app/auth/components/userRelay';
|
import { UserRelay } from '@app/auth/components/userRelay';
|
||||||
@@ -50,9 +50,6 @@ export function OnboardStep3Screen() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// save current step, if user close app and reopen it
|
|
||||||
setStep('/auth/onboarding/step-3');
|
|
||||||
|
|
||||||
const toggleRelay = (relay: string) => {
|
const toggleRelay = (relay: string) => {
|
||||||
if (relays.has(relay)) {
|
if (relays.has(relay)) {
|
||||||
setRelays((prev) => {
|
setRelays((prev) => {
|
||||||
@@ -92,6 +89,11 @@ export function OnboardStep3Screen() {
|
|||||||
|
|
||||||
const relaysAsArray = Array.from(data?.keys() || []);
|
const relaysAsArray = Array.from(data?.keys() || []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// save current step, if user close app and reopen it
|
||||||
|
setStep('/auth/onboarding/step-3');
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto w-full max-w-md">
|
<div className="mx-auto w-full max-w-md">
|
||||||
<div className="mb-8 text-center">
|
<div className="mb-8 text-center">
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
import { getVersion } from '@tauri-apps/plugin-app';
|
import { getVersion } from '@tauri-apps/plugin-app';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { RefreshIcon } from '@shared/icons';
|
import { RefreshIcon } from '@shared/icons';
|
||||||
|
|
||||||
const appVersion = await getVersion();
|
|
||||||
|
|
||||||
export function VersionSetting() {
|
export function VersionSetting() {
|
||||||
|
const [version, setVersion] = useState<string>('');
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
async function checkVersion() {
|
||||||
|
const appVersion = await getVersion();
|
||||||
|
setVersion(appVersion);
|
||||||
|
}
|
||||||
|
checkVersion();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="inline-flex items-center justify-between px-5 py-4">
|
<div className="inline-flex items-center justify-between px-5 py-4">
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
@@ -14,7 +23,7 @@ export function VersionSetting() {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="inline-flex items-center gap-2">
|
<div className="inline-flex items-center gap-2">
|
||||||
<span className="font-medium text-zinc-300">{appVersion}</span>
|
<span className="font-medium text-zinc-300">{version}</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="inline-flex h-8 w-8 items-center justify-center rounded-md bg-zinc-800 font-medium hover:bg-fuchsia-500"
|
className="inline-flex h-8 w-8 items-center justify-center rounded-md bg-zinc-800 font-medium hover:bg-fuchsia-500"
|
||||||
|
|||||||
Reference in New Issue
Block a user