Skip to content

Commit

Permalink
chore: cleanup example code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 committed Sep 5, 2024
1 parent f6c06a3 commit 49d5031
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 31 deletions.
3 changes: 2 additions & 1 deletion examples/vite-core/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const App = () => {
<>
<header>
<h1>Fedimint Typescript Library Demo</h1>
<h3>This is a WIP</h3>
<h2>This is a WIP</h2>
</header>
<main>
<WalletStatus />
Expand Down Expand Up @@ -96,6 +96,7 @@ const JoinFederation = () => {
Join
</button>
</form>
{wallet.isOpen() && <i>(You've already joined a federation)</i>}
{joinResult && <div className="success">{joinResult}</div>}
{joinError && <div className="error">{joinError}</div>}
</div>
Expand Down
44 changes: 15 additions & 29 deletions examples/vite-core/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
line-height: 1.5;
text-rendering: optimizeLegibility;
margin: 1rem;
word-wrap: break-word;

-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down Expand Up @@ -45,21 +46,9 @@ main {
padding: 1rem;
}

.section {
background-color: #242424;
border-radius: 8px;
padding: 0.75rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
font-size: 1.1rem;
}

button {
color: rgba(255, 255, 255, 0.87);
border-radius: 8px;
border: none;
padding: 0.3em 1em;
cursor: pointer;
transition: background-color 0.3s;
h3 {
margin-top: 0;
margin-bottom: 0.75rem;
}

input,
Expand All @@ -77,6 +66,11 @@ input {
max-width: 300px;
}

button {
cursor: pointer;
transition: background-color 0.3s;
}

button:hover {
background-color: #444;
}
Expand All @@ -98,13 +92,6 @@ button:disabled {
margin-bottom: 0;
}

.error,
.success {
white-space: normal;
word-wrap: break-word;
max-width: 100%;
}

.error {
color: red;
}
Expand All @@ -113,9 +100,12 @@ button:disabled {
color: green;
}

h3 {
margin-top: 0;
margin-bottom: 0.75rem;
.section {
background-color: #242424;
border-radius: 8px;
padding: 0.75rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
font-size: 1.1rem;
}

@media (min-width: 768px) {
Expand All @@ -138,10 +128,6 @@ h3 {
margin-bottom: 1rem;
}

.row:last-child {
margin-bottom: 0;
}

input,
button {
font-size: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import topLevelAwait from 'vite-plugin-top-level-await'
export default defineConfig({
plugins: [topLevelAwait(), wasm(), react()],
optimizeDeps: {
exclude: ['core-web'],
exclude: ['@fedimint/core-web'],
},
})

0 comments on commit 49d5031

Please sign in to comment.