Skip to content

Commit

Permalink
feat: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
neretin-trike committed Sep 3, 2024
1 parent ae55b93 commit 74e258f
Show file tree
Hide file tree
Showing 3 changed files with 372 additions and 78 deletions.
106 changes: 53 additions & 53 deletions website/plasma-theme-builder/package-lock.json

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

54 changes: 29 additions & 25 deletions website/plasma-theme-builder/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import React, { useCallback, useEffect, useState } from 'react';
import styled, { css } from 'styled-components';

import { Footer } from './Footer/Footer';
import { Main } from './Main/Main';
import { Generator } from './Generator/Generator';
import { Theme } from './Theme/Theme';
import { Error } from './Error/Error';
import { PullRequest } from './PullRequest/PullRequest';
// import { Footer } from './Footer/Footer';
// import { Main } from './Main/Main';
// import { Generator } from './Generator/Generator';
// import { Theme } from './Theme/Theme';
// import { Error } from './Error/Error';
// import { PullRequest } from './PullRequest/PullRequest';

import { useDefaultThemeData, useFetchTheme } from '../hooks';
import { multipleMediaQuery } from './mixins';
import { getURLParams, pushHistoryState } from '../utils';
import type { Theme as ThemeType } from '../types';
// import { ColorGenerator } from './ColorGenerator/ColorGenerator';
import { ColorGenerator2 } from './ColorGenerator/ColorGenerator2';

const StyledRoot = styled.div`
min-width: 35rem;
Expand Down Expand Up @@ -89,25 +91,27 @@ const App = () => {
setData(data);
}, []);

return (
<StyledRoot>
{state === PAGE_TYPE.MAIN && <Main onSetToken={onSetToken} onGenerateTheme={onGenerateTheme} />}
{state === PAGE_TYPE.GENERATOR && <Generator onMain={onMain} onPreviewTheme={onPreviewTheme} />}
{state === PAGE_TYPE.THEME && (
<Theme
data={data}
defaultData={defaultData}
themeNameFromParam={themeName}
branchNameFromParam={branchName}
onGenerateTheme={onGenerateTheme}
onPullRequest={onPullRequest}
/>
)}
{state === PAGE_TYPE.PULL_REQUEST && <PullRequest data={data} token={token} />}
{state === PAGE_TYPE.ERROR && <Error message={errorMessage} onMain={onMain} />}
<Footer />
</StyledRoot>
);
return <ColorGenerator2 />;

// return (
// <StyledRoot>
// {state === PAGE_TYPE.MAIN && <Main onSetToken={onSetToken} onGenerateTheme={onGenerateTheme} />}
// {/* {state === PAGE_TYPE.GENERATOR && <Generator onMain={onMain} onPreviewTheme={onPreviewTheme} />} */}
// {state === PAGE_TYPE.THEME && (
// <Theme
// data={data}
// defaultData={defaultData}
// themeNameFromParam={themeName}
// branchNameFromParam={branchName}
// onGenerateTheme={onGenerateTheme}
// onPullRequest={onPullRequest}
// />
// )}
// {state === PAGE_TYPE.PULL_REQUEST && <PullRequest data={data} token={token} />}
// {state === PAGE_TYPE.ERROR && <Error message={errorMessage} onMain={onMain} />}
// {/* <Footer /> */}
// </StyledRoot>
// );
};

export default App;
Loading

0 comments on commit 74e258f

Please sign in to comment.