Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a small PR to see if he project is still being monitored #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions examples/components/input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
interface Props {
className: string
disabled?: boolean;
required?: boolean
onKeyUp: any
}

export default function Input(props: Props) {
return <input type='text' className={props.className} disabled={props.disabled ?? false} required={props.required ?? true} onKeyUp={props.onKeyUp}/>
//TODOs: Add Custom Errors responses.
}

2 changes: 1 addition & 1 deletion examples/components/subscribed-symbol.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useContext, useEffect, useState } from 'react'
import _ from 'lodash'
import { AppContext } from '../contexts/context'
import { MarketDataSubscriptionType } from "tastytrade-api"
import { MarketDataSubscriptionType } from "@tastytrade/api"

export default function SubscribedSymbol(props: any) {
const [bidPrice, setBidPrice] = useState(NaN)
Expand Down
1 change: 1 addition & 0 deletions examples/components/vertical-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function VerticalNavBar() {
<VerticalNavLink href = "/symbol-search" title = "Symbol Search"/>
<VerticalNavLink href = "/quote-streamer" title = "Quote Data"/>
<VerticalNavLink href = "/account-streamer" title = "Account Data"/>
<VerticalNavLink href = "/trade" title = "Trade Tab"/>
</ul>
</nav>
)
Expand Down
2 changes: 1 addition & 1 deletion examples/contexts/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// src/context/state.ts
import { createContext } from 'react';
import TastytradeClient, { LogLevel, MarketDataStreamer } from "tastytrade-api"
import TastytradeClient, { LogLevel, MarketDataStreamer } from "@tastytrade/api"
import { makeAutoObservable } from 'mobx';
import _ from 'lodash'

Expand Down
2 changes: 1 addition & 1 deletion examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/pages/account-streamer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextPage } from 'next'
import { STREAMER_STATE } from 'tastytrade-api'
import { STREAMER_STATE } from '@tastytrade/api'
import { useContext, useEffect, useState } from 'react'
import _ from 'lodash'
import toast from 'react-hot-toast'
Expand Down
8 changes: 2 additions & 6 deletions examples/pages/symbol-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import UseHttpRequest from '../components/use-http-request';
import _ from 'lodash'
import CustomTable from '../components/custom-table';
import Button from '../components/button';
import Input from '../components/input';

function parseError(error:any){
if (error.message === 'Network Error'){
Expand Down Expand Up @@ -80,12 +81,7 @@ export default function symbolSearch() {
<div className='w-3/12'>
<h2 className="text-center mb-4">Symbol Search</h2>
<div>Enter symbol</div>
<input
type='text'
className="p-2 w-full border border-gray-400 mb-2"
onKeyUp={handleKeyPress}
required
/>
<Input className="p-2 w-full border border-gray-400 mb-2" onKeyUp={handleKeyPress} />
<Button onClick={handleSearch} title="Search" />
{error && <div>{error}</div>}
{renderResults()}
Expand Down
7 changes: 7 additions & 0 deletions examples/pages/trade.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Trade(){
return (
<div>
<h3>Coming Soon!</h3>
</div>
)
}
35 changes: 35 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"postpack": "git tag -a $npm_package_version -m $npm_package_version && git push origin $npm_package_version"
},
"dependencies": {
"@tastytrade/api": "^5.0.0",
geneticsbay marked this conversation as resolved.
Show resolved Hide resolved
geneticsbay marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed it from the wronge package.json. You need to remove it from the package.json in the project root. You can keep it in the examples/package.json

"@types/lodash": "^4.14.182",
"@types/qs": "^6.9.7",
"axios": "^1.3.4",
Expand Down