Skip to content

Commit

Permalink
fix some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sindrir committed Nov 12, 2024
1 parent 42551fd commit 644c774
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src-tauri/src/image_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn convert_to_webp<P: AsRef<Path>>(image_path: P) -> Result<PathBuf, ImageCo

if !directory_exists(&path) {
fs::create_dir_all(&path)?;
thread::sleep(Duration::from_millis(500));
thread::sleep(Duration::from_millis(500)); // Sleep here a bit so the file watcher can catch up
}

path.push(filename_original_image);
Expand Down
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/components/layouts/main-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const MainLayout: React.FC = () => {
return (
<Split
sizes={[20, 60, 20]}
minSize={[5, 10, 5]}
className="split h-screen"
>
<div className="sticky top-0 overflow-x-auto h-full">
Expand Down
13 changes: 1 addition & 12 deletions src/context/auth-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ const AuthContext = createContext<AuthContextType | null>(null);
interface AuthProviderProps {
children: ReactNode;
}
/*
class RefreshTokenExpiredError extends Error {
constructor(message: string) {
super()
this.message = message
}
message: string;
}
*/

export const AuthProvider: React.FC<AuthProviderProps> = ({children}) => {
const [authResponse, setAuthResponse] = useState<AuthenticationResponse | null>(null);
Expand All @@ -45,7 +35,6 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({children}) => {
useEffect(() => {
const initializeAuth = async () => {
try {
//await settings.init();
await getSecrets();
} catch (error) {
console.error('Error initializing auth:', error);
Expand Down Expand Up @@ -95,7 +84,7 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({children}) => {
if (!secrets?.oidcClientSecret) {
await getSecrets();
}
const port = await invoke('log_in') as unknown as number;
const port = await invoke<number>('log_in');
if (secrets && "oidcBaseUrl" in secrets) {
try {
const loginWebView =
Expand Down
2 changes: 1 addition & 1 deletion src/features/registration/registration-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const RegistrationForm: React.FC = () => {
if (response.ok) {
void deleteDir(pushedDir);
removeErrorMessage();
displaySuccessMessage(await response.json() as TextItemResponse); // TODO check
displaySuccessMessage(await response.json() as TextItemResponse);
} else {
console.error(response);
handleError(undefined, response.status);
Expand Down
Empty file removed src/util/log-util.ts
Empty file.

0 comments on commit 644c774

Please sign in to comment.