Skip to content

Commit

Permalink
language type added for app lang
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostByeBye committed Sep 5, 2024
1 parent 95763fb commit 810bab6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/renderer/lib/loaders.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { getDirectionByLang } from '../../localization';
import { getIspName } from './getIspName';
import { settings } from './settings';

export const loadTheme = () => {
Expand Down
28 changes: 13 additions & 15 deletions src/renderer/lib/toasts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import toast from 'react-hot-toast';
//import { getTranslate } from '../../localization';
import { Language } from '../../localization/type';

const defaultToastStyle = {
fontSize: '13px',
Expand Down Expand Up @@ -28,19 +28,17 @@ export const defaultToastWithSubmitButton = (
) => {
toast(
(currentToast) => (
<>
<div className='customToast'>
<p>{msg}</p>
<button
onClick={() => {
toast.remove(currentToast?.id);
onSubmitCallBack();
}}
>
{submitTitle}
</button>
</div>
</>
<div className='customToast'>
<p>{msg}</p>
<button
onClick={() => {
toast.remove(currentToast?.id);
onSubmitCallBack();
}}
>
{submitTitle}
</button>
</div>
),
{
id: id,
Expand All @@ -62,7 +60,7 @@ export const settingsHaveChangedToast = ({
}: {
isConnected: boolean;
isLoading: boolean;
appLang: any;
appLang: Language;
}) => {
if (doNotShowSettingsHaveChangedToastInCurrentSession) return;
if (isConnected || isLoading) {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/pages/Landing/LandingDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { Link } from 'react-router-dom';

import Drawer from 'react-modern-drawer';
import appIco from '../../../../assets/oblivion.png';
import { Language } from '../../../localization/type';

interface LandingDrawerProps {
appLang: any;
appLang: Language;
drawerIsOpen: boolean;
lang?: string;
hasNewUpdate: boolean;
Expand Down

0 comments on commit 810bab6

Please sign in to comment.