-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change frontend.yml file, added: eslint, prettier, sass, vite.c…
…onfig #4
- Loading branch information
Showing
18 changed files
with
1,069 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"useTabs": false, | ||
"endOfLine": "auto", | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"bracketSameLine": false, | ||
"bracketSpacing": true, | ||
"arrowParens": "always", | ||
"jsxSingleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,54 @@ | ||
import { useState } from 'react' | ||
import reactLogo from './assets/react.svg' | ||
import viteLogo from '/vite.svg' | ||
import './App.css' | ||
import '@rainbow-me/rainbowkit/styles.css' | ||
import { ConnectButton } from '@rainbow-me/rainbowkit' | ||
import { useState } from 'react'; | ||
import reactLogo from './assets/react.svg'; | ||
import viteLogo from '/vite.svg'; | ||
import './index.scss'; | ||
import './App.css'; | ||
import '@rainbow-me/rainbowkit/styles.css'; | ||
import { ConnectButton } from '@rainbow-me/rainbowkit'; | ||
import DevModeToggle from './components/devModeToggle/DevModeToggle'; | ||
|
||
function App() { | ||
const [count, setCount] = useState(0) | ||
const [count, setCount] = useState(0); | ||
const [devModeState, setDevModeState] = useState(false); | ||
const versionDeploy = import.meta.env.VITE_REACT_APP_GIT_TAG; | ||
const dateDeploy = import.meta.env.VITE_REACT_APP_GIT_DATE; | ||
|
||
const handleToggleDevMode = (value: boolean) => { | ||
setDevModeState(value); | ||
}; | ||
|
||
return ( | ||
<> | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank"> | ||
<img src={viteLogo} className="logo" alt="Vite logo" /> | ||
<div className='app appBox'> | ||
{versionDeploy && dateDeploy && ( | ||
<div> | ||
<DevModeToggle isDevMode={devModeState} handleToggleDevMode={handleToggleDevMode} /> | ||
{devModeState && ( | ||
<div> | ||
<p>Version: {versionDeploy}</p> | ||
<p>Date: {dateDeploy}</p> | ||
</div> | ||
)} | ||
</div> | ||
)} | ||
<div className='logoBox'> | ||
<a href='https://vitejs.dev' target='_blank' rel='noreferrer'> | ||
<img src={viteLogo} className='logo' alt='Vite logo' /> | ||
</a> | ||
<a href="https://react.dev" target="_blank"> | ||
<img src={reactLogo} className="logo react" alt="React logo" /> | ||
<a href='https://react.dev' target='_blank' rel='noreferrer'> | ||
<img src={reactLogo} className='logo react' alt='React logo' /> | ||
</a> | ||
</div> | ||
<h1>New</h1> | ||
<div className="card"> | ||
<button onClick={() => setCount((count) => count + 1)}> | ||
count is {count} | ||
</button> | ||
<div className='card'> | ||
<button onClick={() => setCount((count) => count + 1)}>count is {count}</button> | ||
<p> | ||
Edit <code>src/App.tsx</code> and save to test HMR | ||
</p> | ||
</div> | ||
<p className="read-the-docs"> | ||
Click on the Vite and React logos to learn more | ||
</p> | ||
<p className='read-the-docs'>Click on the Vite and React logos to learn more</p> | ||
<ConnectButton /> | ||
</> | ||
) | ||
</div> | ||
); | ||
} | ||
|
||
export default App | ||
export default App; |
14 changes: 14 additions & 0 deletions
14
frontend/src/components/devModeToggle/DevModeToggle.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.devModeToggle { | ||
border: none; | ||
outline: none; | ||
cursor: pointer; | ||
padding: 5px 10px; | ||
min-width: 80px; | ||
display: block; | ||
border-radius: 10px; | ||
font-size: 12px; | ||
background-color: var(--blue); | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import styles from './DevModeToggle.module.scss'; | ||
|
||
interface IDevModeToggle { | ||
isDevMode: boolean; | ||
handleToggleDevMode: (value: boolean) => void; | ||
} | ||
|
||
function DevModeToggle(props: IDevModeToggle) { | ||
const { isDevMode = false, handleToggleDevMode } = props; | ||
|
||
const handleClick = () => { | ||
handleToggleDevMode(!isDevMode); | ||
}; | ||
|
||
return ( | ||
<button className={styles.devModeToggle} onClick={handleClick}> | ||
{isDevMode ? 'DEV ON' : 'DEV OFF'} | ||
</button> | ||
); | ||
} | ||
|
||
export default DevModeToggle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const PROJECT_ID = 'f5f4ef3634a6aa0af5a1d5516608377a'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@import './scss/reset'; | ||
@import './scss/vars'; | ||
|
||
b { | ||
display: inline-block; | ||
font-weight: 700; | ||
font-size: 1.25rem; | ||
line-height: 1; | ||
margin-top: 1.25rem; | ||
} | ||
|
||
ul, | ||
ol { | ||
margin-top: 1rem; | ||
padding-left: 25px; | ||
} | ||
|
||
html { | ||
font-size: 16px; | ||
height: 100%; | ||
} | ||
|
||
body { | ||
height: 100%; | ||
scroll-behavior: smooth; | ||
text-rendering: optimizeSpeed; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
font-weight: 400; | ||
line-height: 1.25; | ||
font-size: 16px; | ||
} | ||
|
||
#root { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.app { | ||
min-height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@mixin fontStyle($fontSizePx, $lineHeightPx: 0) { | ||
font-size: $fontSizePx + px; | ||
@if $lineHeightPx != 0 { | ||
line-height: calc($lineHeightPx / $fontSizePx); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
*, | ||
*:before, | ||
*:after { | ||
box-sizing: border-box; | ||
} | ||
ul, | ||
ol { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
body, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
p, | ||
ul[class], | ||
ol[class], | ||
li, | ||
figure, | ||
figcaption, | ||
blockquote, | ||
dl, | ||
dd { | ||
margin: 0; | ||
} | ||
a { | ||
text-decoration: none; | ||
color: inherit; | ||
} | ||
a:not([class]) { | ||
text-decoration-skip-ink: auto; | ||
} | ||
img { | ||
max-width: 100%; | ||
display: block; | ||
} | ||
article > * + * { | ||
margin-top: 1em; | ||
} | ||
input, | ||
button, | ||
textarea, | ||
select { | ||
padding: 0; | ||
font: inherit; | ||
} | ||
button:focus {outline:0;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:root { | ||
--blue: #7dcfd3; | ||
} |
Oops, something went wrong.