Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
SF Machine User[bot] committed Nov 19, 2024
2 parents b113574 + 5cb9f93 commit 8d89b40
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
12 changes: 12 additions & 0 deletions src/assets/img/tradingview-black-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion src/components/molecules/HistoricalChart/HistoricalChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import {
UTCTimestamp,
WhitespaceData,
} from 'lightweight-charts';
import Link from 'next/link';
import { useCallback, useEffect, useRef, useState } from 'react';
import { useSelector } from 'react-redux';
import TradingViewLogo from 'src/assets/img/tradingview-black-logo.svg';
import { useBreakpoint, useLastPrices } from 'src/hooks';
import { selectLandingOrderForm } from 'src/store/landingOrderForm';
import { RootState } from 'src/store/types';
Expand Down Expand Up @@ -269,7 +271,7 @@ export function HistoricalChart({

return (
<div
className='bg-neutral-900 pt-1 font-tertiary laptop:pt-2.5'
className='relative bg-neutral-900 pt-1 font-tertiary laptop:pt-2.5'
data-chromatic='ignore'
>
<div className={clsx(titleOfChartClass)}>
Expand Down Expand Up @@ -345,6 +347,16 @@ export function HistoricalChart({
data-testid='volume-chart'
className='relative h-[92px] w-full laptop:h-[115px]'
></div>

<Link
href='https://www.tradingview.com/'
target='_blank'
rel='noopener noreferrer'
aria-label='Visit TradingView website'
className='absolute bottom-3 left-3 z-10 overflow-hidden rounded-full'
>
<TradingViewLogo className='h-8 w-8' />
</Link>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`HistoricalChart component should match snapshot 1`] = `
class="w-[600px]"
>
<div
class="bg-neutral-900 pt-1 font-tertiary laptop:pt-2.5"
class="relative bg-neutral-900 pt-1 font-tertiary laptop:pt-2.5"
data-chromatic="ignore"
>
<div
Expand Down Expand Up @@ -248,6 +248,17 @@ exports[`HistoricalChart component should match snapshot 1`] = `
</table>
</div>
</div>
<a
aria-label="Visit TradingView website"
class="absolute bottom-3 left-3 z-10 overflow-hidden rounded-full"
href="https://www.tradingview.com/"
rel="noopener noreferrer"
target="_blank"
>
<svg
class="h-8 w-8"
/>
</a>
</div>
</div>
</div>
Expand Down
10 changes: 0 additions & 10 deletions src/components/organisms/HistoricalWidget/HistoricalWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { toBytes32 } from '@secured-finance/sf-graph-client';
import queries from '@secured-finance/sf-graph-client/dist/graphclients';
import Link from 'next/link';
import { useMemo, useState } from 'react';
import { useSelector } from 'react-redux';
import { DropdownSelector, RadioButton } from 'src/components/atoms';
Expand Down Expand Up @@ -94,15 +93,6 @@ export const HistoricalWidget = () => {
onChange={(time: string) => onTimeScaleChange(time)}
/>
</div>
<Link
href='https://www.tradingview.com/'
target='_blank'
rel='noopener noreferrer'
aria-label='Visit TradingView website'
className='leading-3.5 rounded-md border border-neutral-200 px-2.5 py-1 text-2.5 font-semibold text-neutral-50'
>
Powered by TradingView
</Link>
</div>
<HistoricalChart data={data} timeScale={selectedTimeScale} />
</>
Expand Down

0 comments on commit 8d89b40

Please sign in to comment.