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

refactor(repo): fractal #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
92 changes: 92 additions & 0 deletions results.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
INFO: Generating tree for: src/**/*.*
INFO: File renamed: state/application/hooks.ts -> state-application-hooks.ts
INFO: File renamed: components/Modal/Header.tsx -> components-Modal-Header.tsx
src
├──_app
│ ├──globals
│ │ └──variables.css
│ └──globals.css
├──Button
│ ├──Dots
│ │ ├──functions
│ │ │ ├──array
│ │ │ │ └──chunkArray.ts
│ │ │ ├──array.ts
│ │ │ ├──retry.ts
│ │ │ └──styling.ts
│ │ └──functions.ts
│ ├──Dots.tsx
│ └──Loader.tsx
├──Header
│ ├──Container.tsx
│ └──NavigationItem.tsx
├──hooks
│ ├──state
│ │ ├──reducer
│ │ │ ├──reducer.test.ts
│ │ │ └──reducer.ts
│ │ └──reducer.ts
│ └──state.ts
├──IconSelector
│ ├──IconMakerModal
│ │ ├──BackgroundMaker.tsx
│ │ └──PresetBackgrounds.tsx
│ └──IconMakerModal.tsx
├──ImageEditor
│ └──ImageEditor.tsx
├──Input
│ └──Address.tsx
├──QuestionHelper
│ ├──Tooltip
│ │ └──Popover.tsx
│ └──Tooltip.tsx
├──shared
│ └──actions.ts
├──web3
│ ├──hooks
│ │ └──useActiveWeb3React.ts
│ └──hooks.ts
├──_app.tsx
├──Action.tsx
├──actions.ts
├──Actions.tsx
├──Body.tsx
├──Button.tsx
├──Card.tsx
├──Checkbox.tsx
├──components-Modal-Header.tsx
├──constants.ts
├──Content.tsx
├──defaultTokenList.tsx
├──ERC20.json
├──Error.tsx
├──getImageResolution.ts
├──Header.tsx
├──HeadlessUIModal.tsx
├──hooks.ts
├──IconSelector.tsx
├──ImageEditor.tsx
├──Input.tsx
├──Layout.tsx
├──NetworkModal.tsx
├──networks.ts
├──pages.tsx
├──Portals.tsx
├──QuestionHelper.tsx
├──state-application-hooks.ts
├──style.css
├──submitToken.ts
├──toBase64.ts
├──token-lists.ts
├──tokenData.ts
├──TokenDetails.tsx
├──updater.ts
├──useDebounce.ts
├──useInterval.ts
├──useIsWindowVisible.ts
├──useOnClickOutside.ts
├──useToggle.ts
├──useTokenData.ts
├──web3.ts
├──Web3Network.tsx
└──web3React.ts
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/Button/index.tsx → src/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { classNames } from "app/functions";
import React, { FC, ReactNode } from "react";

import Dots from "../Dots";
import Loader from "../Loader";
import Dots from "./Button/Dots";
import Loader from "./Button/Loader";

export type ButtonColor =
| "red"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dots/index.tsx → src/Button/Dots.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { classNames } from "../../functions";
import { classNames } from "./Dots/functions";

interface DotsProps {
children?: any;
Expand Down
3 changes: 3 additions & 0 deletions src/Button/Dots/functions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "./functions/styling";
export * from "./functions/array";
export * from "./functions/retry";
1 change: 1 addition & 0 deletions src/Button/Dots/functions/array.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { chunkArray } from "./array/chunkArray";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/components/Header/index.tsx → src/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Image from "next/image";
import React from "react";
import Container from "../Container";
import { NavigationItem } from "./NavigationItem";
import Container from "./Header/Container";
import { NavigationItem } from "./Header/NavigationItem";

export const HEADER_HEIGHT = 64;
const NAV_CLASS =
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import toBase64 from "app/functions/toBase64";
import Image from "next/image";
import { useState } from "react";
import Dropzone from "react-dropzone";
import IconMakerModal from "./IconMakerModal";
import IconMakerModal from "./IconSelector/IconMakerModal";

export default function IconSelector({
tokenIcon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { useCallback, useEffect, useState } from "react";
import { ChromePicker, SketchPicker } from "react-color";
import Dropzone from "react-dropzone";
import Resizer from "react-image-file-resizer";
import PresetBackgrounds from "./IconMaker/PresetBackgrounds";
import BackgroundMaker from "./IconMaker/BackgroundMaker";
import PresetBackgrounds from "./IconMakerModal/PresetBackgrounds";
import BackgroundMaker from "./IconMakerModal/BackgroundMaker";

export default function IconMakerModal({ isOpen, close, setImage }) {
const [logoId, setLogoId] = useState<number>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dynamic from "next/dynamic";
import React from "react";

const ImageEditorDynamic = dynamic(() => import("./ImageEditor"), {
const ImageEditorDynamic = dynamic(() => import("./ImageEditor/ImageEditor"), {
ssr: false,
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/index.tsx → src/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Address from "./Address";
import Address from "./Input/Address";

const Input = {
Address,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useOnClickOutside } from 'app/hooks/useOnClickOutside'
import useToggle from 'app/hooks/useToggle'
import React, { FC, ReactElement, ReactNode, useCallback, useRef, useState } from 'react'

import Tooltip from '../Tooltip'
import Tooltip from './QuestionHelper/Tooltip'

const QuestionHelper: FC<{ text?: any; icon?: ReactNode; children?: ReactElement; className?: string }> = ({
className,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { classNames } from "app/functions";
import React, { ReactNode, useCallback, useState } from "react";

import Popover, { PopoverProps } from "../Popover";
import Popover, { PopoverProps } from "./Tooltip/Popover";

interface TooltipProps extends Omit<PopoverProps, "content"> {
text: ReactNode;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/_app.tsx → src/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "../styles/globals.css";
import "./_app/globals.css";
import type { AppProps } from "next/app";
import Layout from "components/Layout";
import store from "app/state";
Expand Down
2 changes: 1 addition & 1 deletion src/styles/globals.css → src/_app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@import '@fontsource/dm-sans/index.css';
@import 'react-virtualized/styles.css';
@import 'rc-slider/assets/index.css';
@import './variables.css';
@import './globals/variables.css';

@tailwind components;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/functions/array/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/functions/index.ts

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/state/hooks.ts → src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'

import { AppDispatch, AppState } from '.'
import { AppDispatch, AppState } from './hooks/state'

export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppSelector: TypedUseSelectorHook<AppState> = useSelector
2 changes: 1 addition & 1 deletion src/state/index.ts → src/hooks/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Action, configureStore, ThunkAction } from '@reduxjs/toolkit'
import { FLUSH, PAUSE, PERSIST, persistReducer, persistStore, PURGE, REGISTER, REHYDRATE } from 'redux-persist'
import storage from 'redux-persist/lib/storage'

import reducer from './reducer'
import reducer from './state/reducer'

let store

Expand Down
2 changes: 1 addition & 1 deletion src/state/reducer.ts → src/hooks/state/reducer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { combineReducers } from "@reduxjs/toolkit";

import application from "./application/reducer";
import application from "./reducer/reducer";

const reducer = combineReducers({
application,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ChainId } from '@sushiswap/core-sdk'
import { createStore, Store } from 'redux'

import { addPopup, ApplicationModal, removePopup, setOpenModal, updateBlockNumber } from './actions'
import { addPopup, ApplicationModal, removePopup, setOpenModal, updateBlockNumber } from '../../../shared/actions'
import reducer, { ApplicationState } from './reducer'

describe('application reducer', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
updateBlockNumber,
updateBlockTimestamp,
updateChainId,
} from './actions'
} from '../../../shared/actions'

type PopupList = Array<{
key: string
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/services/web3/hooks/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/services/web3/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/state/application/updater.ts → src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
updateBlockNumber,
updateBlockTimestamp,
updateChainId,
} from "./actions";
} from "./shared/actions";

export default function Updater(): null {
const { library, chainId, account } = useActiveWeb3React();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/web3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./web3/hooks";
1 change: 1 addition & 0 deletions src/web3/hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useActiveWeb3React } from "./hooks/useActiveWeb3React";
File renamed without changes.