generated from visoftsolutions/ksox-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from visoftsolutions/3-develop-transfer-functio…
…nality-with-ethereum-wallet-integration-for-ksox-finance-frontend basic routes and nav redesign
- Loading branch information
Showing
30 changed files
with
1,161 additions
and
1,983 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { component$ } from "@builder.io/qwik"; | ||
import type { DocumentHead } from "@builder.io/qwik-city"; | ||
|
||
export default component$(() => { | ||
return <></>; | ||
}); | ||
|
||
export const head: DocumentHead = { | ||
title: "KSOX-account", | ||
meta: [ | ||
{ | ||
name: "description", | ||
content: "Account control panel", | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { component$ } from "@builder.io/qwik"; | ||
import type { DocumentHead } from "@builder.io/qwik-city"; | ||
|
||
export default component$(() => { | ||
return <></>; | ||
}); | ||
|
||
export const head: DocumentHead = { | ||
title: "KSOX-business", | ||
meta: [ | ||
{ | ||
name: "description", | ||
content: "Crypto business platform", | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { style } from "@vanilla-extract/css"; | ||
import { vars } from "~/theme.css"; | ||
|
||
const background = style({ | ||
backgroundColor: vars.color.background, | ||
}); | ||
|
||
export const mainBuySell = style({ | ||
height: "100%", | ||
display: "grid", | ||
gridTemplateColumns: "1fr 300px", | ||
gap: "1px", | ||
}); | ||
|
||
export const buySell = style([background, {}]); | ||
|
||
export const mainPosition = style({ | ||
display: "grid", | ||
gridTemplateRows: "1fr 350px", | ||
gap: "1px", | ||
}); | ||
|
||
export const position = style([background, {}]); | ||
|
||
export const chartOrderbook = style({ | ||
display: "grid", | ||
gridTemplateColumns: "1fr 350px", | ||
gap: "1px", | ||
}); | ||
|
||
export const chart = style([background, {}]); | ||
|
||
export const orderbook = style([background, {}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { component$ } from "@builder.io/qwik"; | ||
import { type RequestHandler, routeLoader$ } from "@builder.io/qwik-city"; | ||
import { parseMarket } from "./parseMarket"; | ||
import { | ||
buySell, | ||
chart, | ||
chartOrderbook, | ||
mainBuySell, | ||
mainPosition, | ||
orderbook, | ||
position, | ||
} from "./index.css"; | ||
|
||
export const onRequest: RequestHandler = ({ params, redirect, sharedMap }) => { | ||
try { | ||
const market = parseMarket(params.market); | ||
sharedMap.set("quoteAsset", market.quoteAsset); | ||
sharedMap.set("baseAsset", market.baseAsset); | ||
} catch (error) { | ||
redirect(300, "/"); | ||
} | ||
}; | ||
|
||
export const useMarket = routeLoader$(({ sharedMap }) => { | ||
return { | ||
quoteAsset: sharedMap.get("quoteAsset") as string, | ||
baseAsset: sharedMap.get("baseAsset") as string, | ||
}; | ||
}); | ||
|
||
export default component$(() => { | ||
const { quoteAsset, baseAsset } = useMarket().value; | ||
console.log(quoteAsset); | ||
console.log(baseAsset); | ||
|
||
return ( | ||
<div class={mainBuySell}> | ||
<div class={mainPosition}> | ||
<div class={chartOrderbook}> | ||
<div class={chart}></div> | ||
<div class={orderbook}></div> | ||
</div> | ||
<div class={position}></div> | ||
</div> | ||
<div class={buySell}></div> | ||
</div> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const parseMarket = (market: string) => { | ||
const regex = /^(\w+)-(\w+)$/; | ||
const match = market.match(regex); | ||
if (match) { | ||
return { | ||
quoteAsset: match[1].toUpperCase(), | ||
baseAsset: match[2].toUpperCase(), | ||
}; | ||
} else { | ||
throw new Error("Cound not parse market"); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { style } from "@vanilla-extract/css"; | ||
import { vars } from "~/theme.css"; | ||
|
||
const background = style({ | ||
backgroundColor: vars.color.background, | ||
}); | ||
|
||
export const index = style([ | ||
background, | ||
{ | ||
height: "100%", | ||
}, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { component$ } from "@builder.io/qwik"; | ||
import type { DocumentHead } from "@builder.io/qwik-city"; | ||
import { index } from "./index.css"; | ||
|
||
export default component$(() => { | ||
return <div class={index}></div>; | ||
}); | ||
|
||
export const head: DocumentHead = { | ||
title: "KSOX-exchange", | ||
meta: [ | ||
{ | ||
name: "description", | ||
content: "Exchange crypto", | ||
}, | ||
], | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { component$, Slot } from "@builder.io/qwik"; | ||
|
||
export default component$(() => { | ||
return ( | ||
<> | ||
<Slot /> | ||
</> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { component$ } from "@builder.io/qwik"; | ||
import type { DocumentHead } from "@builder.io/qwik-city"; | ||
|
||
export default component$(() => { | ||
return <></>; | ||
}); | ||
|
||
export const head: DocumentHead = { | ||
title: "KSOX-people", | ||
meta: [ | ||
{ | ||
name: "description", | ||
content: "Find people manage friends", | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { style } from "@vanilla-extract/css"; | ||
import { background } from "../layout.css"; | ||
|
||
export const conversation = style({ | ||
display: "grid", | ||
gridTemplateRows: "1fr 100px", | ||
gap: "1px", | ||
}); | ||
|
||
export const chat = style([background, {}]); | ||
|
||
export const message = style([background, {}]); |
Oops, something went wrong.