Skip to content

Commit

Permalink
Creation logic (mnemonic validation missing)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaffinPX committed Oct 17, 2024
1 parent a6f04b4 commit c58a118
Show file tree
Hide file tree
Showing 12 changed files with 251 additions and 356 deletions.
260 changes: 0 additions & 260 deletions _locales/en/messages.json

This file was deleted.

8 changes: 1 addition & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<!doctype html>
<html lang="en">
<html lang="en" data-theme="cupcake">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kaspian</title>

<!-- This css prevents white flash and scrollbar when reloading -->
<style>
html {
background-color: #000;
min-width: 365px;
min-height: 592px;
}

body::-webkit-scrollbar {
display: none;
}
</style>
</head>
<body>
Expand Down
3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { MemoryRouter, Route, Routes } from 'react-router-dom'
import { SettingsProvider } from './contexts/Settings'
import { KaspaProvider } from './contexts/Kaspa'
import Landing from './pages/Landing'
import Creation from './pages/Creation'

function App () {
return (
<SettingsProvider>
<KaspaProvider>
<MemoryRouter>
<Routes>
<Route path="/" element={<Landing />} />
<Route path="/creation" element={<Creation />} />
</Routes>
</MemoryRouter>
</KaspaProvider>
Expand Down
6 changes: 3 additions & 3 deletions src/contexts/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function SettingsProvider({ children }: {
LocalStorage.set("settings", settings)
}, [ settings ])

useEffect(() => {
useEffect(() => { // TODO: Migrate to daisyUI
const root = window.document.documentElement

root.classList.remove("light", "dark")
Expand All @@ -64,11 +64,11 @@ export function SettingsProvider({ children }: {
? "dark"
: "light"

root.classList.add(systemTheme)
// root.classList.add(systemTheme)
return
}

root.classList.add(settings['theme'])
// root.classList.add(settings['theme'])
}, [ settings['theme'] ])

const load = useCallback(async () => {
Expand Down
2 changes: 2 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import ReactDOM from 'react-dom/client'
import App from './App'

import './style.css'

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<App />
)
Loading

0 comments on commit c58a118

Please sign in to comment.