Skip to content

Commit

Permalink
Renamed UI package to stateless.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Oct 21, 2022
1 parent ba985d2 commit 2f02ebd
Show file tree
Hide file tree
Showing 489 changed files with 314 additions and 314 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ In general, you'll want to either (1) create issues for bugs or (2) create pull
If you spot a problem, [search if an issue already
exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments).
If a related issue doesn't exist, you can open a new issue using a relevant
[issue form](https://github.com/DA0-DA0/dao-ui/issues/new/choose).
[issue form](https://github.com/DA0-DA0/dao-dao-ui/issues/new/choose).

#### Solve an issue

Scan through our [existing issues](https://github.com/DA0-DA0/dao-ui/issues) to
Scan through our [existing issues](https://github.com/DA0-DA0/dao-dao-ui/issues) to
find one that interests you. You can narrow down the search using `labels` as
filters. As a general rule, we don't assign issues to anyone. If you find an
issue to work on, you are welcome to open a PR with a fix.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ You can find more info in our [documentation](https://docs.daodao.zone). Join th
### Clone this repo and install dependencies

```bash
git clone https://github.com/DA0-DA0/dao-ui
cd dao-ui
git clone https://github.com/DA0-DA0/dao-dao-ui
cd dao-dao-ui
yarn
```

If you're here to work on UI components in isolation:

```bash
yarn ui storybook
yarn storybook start
```

If you're here to work on app-wide stuff, run the `yarn dev` script (equivalent to running `yarn dev` from the `apps/dapp` folder) to run the main app in development mode.

```bash
yarn turbo run dev
yarn dev
```

Learn more about [Turborepo](https://turborepo.org/docs).
Expand All @@ -43,7 +43,7 @@ Learn more about [Turborepo](https://turborepo.org/docs).

#### `packages/`

- [(wip)](https://github.com/DA0-DA0/dao-ui/issues/368)
- [(wip)](https://github.com/DA0-DA0/dao-dao-ui/issues/368)

### Learn More

Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
ProposalCreatedModal,
AppLayout as StatelessAppLayout,
useCachedLoadable,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { loadableToLoadingData, usePlatform } from '@dao-dao/utils'

import {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/InstallKeplr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { ArrowForwardIos } from '@mui/icons-material'
import { useTranslation } from 'react-i18next'

import { Button, Modal, ModalProps } from '@dao-dao/ui'
import { Button, Modal, ModalProps } from '@dao-dao/stateless'

export type InstallKeplrProps = Pick<ModalProps, 'visible' | 'onClose'>

Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/NoKeplrAccountModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { ArrowForwardIos } from '@mui/icons-material'
import { useTranslation } from 'react-i18next'

import { Button, Modal, ModalProps } from '@dao-dao/ui'
import { Button, Modal, ModalProps } from '@dao-dao/stateless'

export type NoKeplrAccountModalProps = Pick<ModalProps, 'visible' | 'onClose'>

Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/Paginator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import Link from 'next/link'

import { Button } from '@dao-dao/ui'
import { Button } from '@dao-dao/stateless'

function Paginator({
page,
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/TokenCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
TokenCard as StatelessTokenCard,
useCachedLoadable,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { StakeType, loadableToLoadingData, useAddToken } from '@dao-dao/utils'

export const TokenCard = (props: TokenCardInfo) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/dao/DaoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useEffect } from 'react'
import { daoCardInfoLazyDataSelector } from '@dao-dao/common'
import { usePinnedDaos } from '@dao-dao/state'
import { DaoCardInfo } from '@dao-dao/types/components/DaoCard'
import { DaoCard as StatelessDaoCard, useCachedLoadable } from '@dao-dao/ui'
import { DaoCard as StatelessDaoCard, useCachedLoadable } from '@dao-dao/stateless'
import { CHAIN_ID, loadableToLoadingData } from '@dao-dao/utils'

export const DaoCard = (props: DaoCardInfo) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/dao/DaoTreasuryHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
LineGraph,
Loader,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import {
CHAIN_TXN_URL_PREFIX,
NATIVE_DECIMALS,
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/dao/SplashDaoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEffect } from 'react'

import { daoCardInfoLazyDataSelector } from '@dao-dao/common'
import { DaoCardInfo } from '@dao-dao/types/components/DaoCard'
import { DaoCard as StatelessDaoCard, useCachedLoadable } from '@dao-dao/ui'
import { DaoCard as StatelessDaoCard, useCachedLoadable } from '@dao-dao/stateless'
import { loadableToLoadingData } from '@dao-dao/utils'

// Doesn't load any wallet information or allow pinning.
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/dao/tabs/ProposalsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useVotingModule } from '@dao-dao/state'
import {
ProposalsTab as StatelessProposalsTab,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'

export const ProposalsTab = () => {
const daoInfo = useDaoInfoContext()
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/dao/tabs/SubDaosTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ContractVersion } from '@dao-dao/types'
import {
SubDaosTab as StatelessSubDaosTab,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { loadableToLoadingData } from '@dao-dao/utils'

import { DaoCard } from '../DaoCard'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/dao/tabs/TreasuryAndNftsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
TreasuryAndNftsTab as StatelessTreasuryAndNftsTab,
useCachedLoadable,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { loadableToLoadingData } from '@dao-dao/utils'
import {
useCw20GovernanceTokenInfoResponseIfExists,
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/profile/ProfileHomeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useWalletProfile, useWalletProposalsQuery } from '@dao-dao/state'
import {
ProfileHomeCard as StatelessProfileHomeCard,
useAppLayoutContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { NATIVE_DECIMALS, NATIVE_DENOM, nativeTokenLabel } from '@dao-dao/utils'

import { useDAppContext } from '../DAppContext'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/profile/ProfileNewProposalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ProfileNewProposalCard as StatelessProfileNewProposalCard,
useAppLayoutContext,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'

export interface ProfileNewProposalCardProps {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/components/profile/ProfileProposalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ProfileVotedCard,
useAppLayoutContext,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'

export interface ProfileProposalCardProps {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
})
const withInterceptStdout = require('next-intercept-stdout')
const withTM = require('next-transpile-modules')([
'@dao-dao/ui',
'@dao-dao/stateless',
'@dao-dao/utils',
'@dao-dao/state',
'@dao-dao/actions',
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@dao-dao/i18n": "2.0.1",
"@dao-dao/proposal-module-adapter": "2.0.1",
"@dao-dao/types": "2.0.1",
"@dao-dao/ui": "2.0.1",
"@dao-dao/stateless": "2.0.1",
"@dao-dao/utils": "2.0.1",
"@dao-dao/voting-module-adapter": "2.0.1",
"@fontsource/inter": "^4.5.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'

import { SuspenseLoader } from '@dao-dao/common'
import { serverSideTranslations } from '@dao-dao/i18n/serverSideTranslations'
import { ErrorPage } from '@dao-dao/ui'
import { ErrorPage } from '@dao-dao/stateless'

const Custom404: NextPage = () => {
const { t } = useTranslation()
Expand Down
4 changes: 2 additions & 2 deletions apps/dapp/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// GNU AFFERO GENERAL PUBLIC LICENSE Version 3. Copyright (C) 2022 DAO DAO Contributors.
// See the "LICENSE" file in the root directory of this package for more copyright information.

import '@dao-dao/ui/styles/index.css'
import '@dao-dao/stateless/styles/index.css'
import '@fontsource/inter/latin.css'
import '@fontsource/jetbrains-mono/latin.css'

Expand All @@ -19,7 +19,7 @@ import {
activeThemeAtom,
mountedInBrowserAtom,
} from '@dao-dao/state'
import { Theme, ThemeProvider, ToastNotifications } from '@dao-dao/ui'
import { Theme, ThemeProvider, ToastNotifications } from '@dao-dao/stateless'
import { SITE_IMAGE, SITE_URL } from '@dao-dao/utils'

import { AppLayout, HomepageLayout } from '@/components'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/_error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import NextErrorComponent from 'next/error'
import Link from 'next/link'
import { useEffect } from 'react'

import { ErrorPage } from '@dao-dao/ui'
import { ErrorPage } from '@dao-dao/stateless'
import { processError } from '@dao-dao/utils'

interface CustomErrorComponentProps {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/dao/[address]/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
DaoPageWrapperProps,
} from '@dao-dao/common'
import { makeGetDaoStaticProps } from '@dao-dao/common/server'
import { useDaoInfoContext } from '@dao-dao/ui'
import { useDaoInfoContext } from '@dao-dao/stateless'
import { SITE_URL, getFallbackImage } from '@dao-dao/utils'

const InnerCreateSubDaoPage = () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/dao/[address]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
ProfileNotMemberCard,
useAppLayoutContext,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { SITE_URL } from '@dao-dao/utils'
import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'

Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/dao/[address]/proposals/[proposalId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
Proposal,
ProposalNotFound,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { SITE_URL } from '@dao-dao/utils'
import { useVotingModuleAdapter } from '@dao-dao/voting-module-adapter'

Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/dao/[address]/proposals/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
PageLoader,
ProfileDisconnectedCard,
useDaoInfoContext,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { SITE_URL } from '@dao-dao/utils'

import { ProfileNewProposalCard } from '@/components'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/dao/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'

import { CreateDaoForm, SuspenseLoader } from '@dao-dao/common'
import { serverSideTranslations } from '@dao-dao/i18n/serverSideTranslations'
import { PageLoader } from '@dao-dao/ui'
import { PageLoader } from '@dao-dao/stateless'
import { SITE_URL } from '@dao-dao/utils'

const CreateDaoPage: NextPage = () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
useLoadingFeaturedDaoCardInfos,
useLoadingPinnedDaoCardInfos,
} from '@dao-dao/state'
import { Home, ProfileDisconnectedCard } from '@dao-dao/ui'
import { Home, ProfileDisconnectedCard } from '@dao-dao/stateless'

import { commandModalVisibleAtom } from '@/atoms'
import { DaoCard, ProfileHomeCard } from '@/components'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/inbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Inbox,
PageLoader,
ProfileDisconnectedCard,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { CHAIN_ID, SITE_URL } from '@dao-dao/utils'

import { ProfileHomeCard, useDAppContext } from '@/components'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
SplashEnterAppButton,
SplashGradientWrapper,
SplashStatsCard,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'

import { SplashDaoCard } from '@/components'

Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/pages/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
ProfileDisconnectedCard,
Wallet,
WalletProps,
} from '@dao-dao/ui'
} from '@dao-dao/stateless'
import { CHAIN_BECH32_PREFIX, CHAIN_ID, processError } from '@dao-dao/utils'

import { ProfileHomeCard } from '@/components'
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const tailwindConfig = {
'./{components,pages,services}/**/*.{js,jsx,ts,tsx}',
'../../packages/**/*.{js,jsx,ts,tsx}',
],
presets: [require('@dao-dao/ui/tailwind/config')],
presets: [require('@dao-dao/config/tailwind/config')],
theme: {
extend: {
keyframes: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "turbo run test",
"dapp": "yarn workspace @dao-dao/dapp",
"state": "yarn workspace @dao-dao/state",
"ui": "yarn workspace @dao-dao/ui",
"stateless": "yarn workspace @dao-dao/stateless",
"utils": "yarn workspace @dao-dao/utils",
"actions": "yarn workspace @dao-dao/actions",
"common": "yarn workspace @dao-dao/common",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/AddCw20.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { AddCw20Emoji } from '@dao-dao/ui'
import { AddCw20Emoji } from '@dao-dao/stateless'
import { makeWasmMessage } from '@dao-dao/utils'

import { AddCw20Component as StatelessAddCw20Component } from '../components/AddCw20'
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/AddCw721.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { AddCw721Emoji } from '@dao-dao/ui'
import { AddCw721Emoji } from '@dao-dao/stateless'
import { makeWasmMessage } from '@dao-dao/utils'

import { AddCw721Component as StatelessAddCw721Component } from '../components/AddCw721'
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/Custom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { CustomEmoji } from '@dao-dao/ui'
import { CustomEmoji } from '@dao-dao/stateless'
import { makeWasmMessage } from '@dao-dao/utils'

import { CustomComponent as Component } from '../components/Custom'
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/Execute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { ExecuteEmoji } from '@dao-dao/ui'
import { ExecuteEmoji } from '@dao-dao/stateless'
import {
NATIVE_DECIMALS,
convertDenomToMicroDenomWithDecimals,
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/Instantiate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { InstantiateEmoji } from '@dao-dao/ui'
import { InstantiateEmoji } from '@dao-dao/stateless'
import {
NATIVE_DECIMALS,
convertDenomToMicroDenomWithDecimals,
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/ManageSubDaos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types'
import { ManageSubDaosEmoji } from '@dao-dao/ui'
import { ManageSubDaosEmoji } from '@dao-dao/stateless'
import { makeWasmMessage } from '@dao-dao/utils'

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/MigrateContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
UseDefaults,
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { MigrateContractEmoji } from '@dao-dao/ui'
import { MigrateContractEmoji } from '@dao-dao/stateless'

import { MigrateContractComponent as StatelessMigrateContractComponent } from '../components/MigrateContract'

Expand Down
2 changes: 1 addition & 1 deletion packages/actions/actions/RemoveCw20.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
UseTransformToCosmos,
} from '@dao-dao/types/actions'
import { TokenInfoResponse } from '@dao-dao/types/contracts/Cw20Base'
import { RemoveCw20Emoji } from '@dao-dao/ui'
import { RemoveCw20Emoji } from '@dao-dao/stateless'
import { makeWasmMessage } from '@dao-dao/utils'

import { RemoveCw20Component as StatelessRemoveCw20Component } from '../components/RemoveCw20'
Expand Down
Loading

0 comments on commit 2f02ebd

Please sign in to comment.