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

Release RNP things #640

Merged
merged 20 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f95d328
fix(rnp): create rnp chart component
atticusofsparta Jan 6, 2025
567909d
Merge branch 'PE-7274-funding-source' into PE-7363-rnp-chart
atticusofsparta Jan 6, 2025
5fecb84
fix(rnp): fix padding
atticusofsparta Jan 6, 2025
3a33e82
Merge branch 'PE-7274-funding-source' into PE-7363-rnp-chart
atticusofsparta Jan 6, 2025
3ed16d0
Merge branch 'PE-7274-funding-source' into PE-7363-rnp-chart
atticusofsparta Jan 7, 2025
6c7050f
fix(rnpchart): add rnpchart to home search
atticusofsparta Jan 8, 2025
7b7e52b
Merge remote-tracking branch 'origin/develop' into PE-7363-rnp-chart
atticusofsparta Jan 8, 2025
241c3d5
fix(chart): add bandaid for setting tooltip position on load
atticusofsparta Jan 8, 2025
5a2397a
fix(subcomponent): start subcomponent on rnp table
atticusofsparta Jan 8, 2025
e5c2cad
fix(home search): use prexisting layout for price and name
atticusofsparta Jan 8, 2025
6a25405
Merge branch 'PE-7363-rnp-chart' into PE-7365-rnp-page
atticusofsparta Jan 8, 2025
20cc2f8
feat(rnp page): added RNP page
atticusofsparta Jan 9, 2025
1431c09
fix(icon): add icon for returned names page
atticusofsparta Jan 9, 2025
233f680
fix(table border): add wrapper classname and fix table border
atticusofsparta Jan 9, 2025
fde8608
fix(button): name button register instead of buy
atticusofsparta Jan 9, 2025
1fa5f8d
Merge pull request #638 from ar-io/PE-7363-rnp-chart
atticusofsparta Jan 9, 2025
fb6ff4c
fix(switch): use rem instead of px
atticusofsparta Jan 9, 2025
8b9d2b0
fix(rnp chart): render as fragment if no returned name details
atticusofsparta Jan 9, 2025
63b4070
fix(table view): use rem text size
atticusofsparta Jan 9, 2025
e9591f0
Merge pull request #639 from ar-io/PE-7365-rnp-page
atticusofsparta Jan 9, 2025
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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
},
"dependencies": {
"@ant-design/icons": "5.4.0",
"@ar.io/sdk": "^3.1.0-alpha.9",
"@ar.io/sdk": "^3.2.0-alpha.3",
"@permaweb/aoconnect": "^0.0.59",
"@radix-ui/react-select": "^2.1.4",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-select": "^2.1.4",
"@radix-ui/react-switch": "^1.1.2",
"@sentry/react": "^7.45.0",
"@tanstack/react-query": "^5.51.21",
"@tanstack/react-query-persist-client": "^5.45.1",
Expand All @@ -53,6 +54,7 @@
"react-icons": "^5.0.1",
"react-markdown": "6",
"react-router-dom": "^6.4.2",
"recharts": "^2.15.0",
"viem": "2.x",
"wagmi": "^2.12.2"
},
Expand Down
14 changes: 14 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ const SettingsLayout = React.lazy(
() => import('./components/pages/Settings/SettingsLayout'),
);

const RNPPage = React.lazy(() => import('./components/pages/RNPPage/RNPPage'));

const sentryCreateBrowserRouter =
Sentry.wrapCreateBrowserRouter(createHashRouter);

Expand Down Expand Up @@ -323,6 +325,18 @@ function App() {
</Suspense>
}
/>
<Route
path="/returned-names"
element={
<Suspense
fallback={
<PageLoader loading={true} message={'Loading, please wait'} />
}
>
<RNPPage />
</Suspense>
}
/>
</Route>
<Route
path="settings"
Expand Down
59 changes: 59 additions & 0 deletions src/components/data-display/charts/RNPChart.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { AoReturnedName } from '@ar.io/sdk';
import '@src/index.css';
import type { Meta, StoryObj } from '@storybook/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

import { RNPChart } from './RNPChart';

const meta = {
title: 'Charts/RNPChart',
component: RNPChart,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
decorators: [
(Story, { parameters }) => {
switch (true) {
default: {
// TODO: add correct test data
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
initialData: () => parameters.rnpDetails,
},
},
});
return (
<QueryClientProvider client={queryClient}>
<div className="flex w-[700px] h-[500px] bg-background p-10 rounded-xl">
<Story />
</div>
</QueryClientProvider>
);
}
}
},
],
} as Meta<typeof RNPChart>;

export default meta;
type Story = StoryObj<typeof meta>;

const stubData: AoReturnedName = {
name: 'ardrive',
startTimestamp: Date.now(),
endTimestamp: Date.now() + 1 ** 6,
initiator: '1'.padEnd(43, '1'),
premiumMultiplier: 2,
};

export const Chart: Story = {
args: {
name: 'hsdlkjfhlskdjfhlksdjhflksdjhflkjhsdflkhdlfkjshdflkj',
},
parameters: {
rnpDetails: stubData,
},
};
Loading
Loading