Skip to content

Commit

Permalink
Merge pull request #38 from decay95/main
Browse files Browse the repository at this point in the history
[Nick] 1주차 2번째 PR
  • Loading branch information
decay95 authored May 16, 2022
2 parents 6346dea + 6fdd49d commit 85646ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
<title>VM</title>
</head>
<body>
<div id="root"></div>
Expand Down
12 changes: 10 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import { useState } from 'react';
import { useEffect, useState } from 'react';
import GlobalStlyes from './Assets/GlobalStyles';
import { Header } from './components/header/header';
import { Main } from './components/main/main';
import './App.css';

function App() {
const [isVMClicked, setVMClicked] = useState(true);
const [isWalletClicked, setWalletClicked] = useState(false);

const [isWalletClicked, setWalletClicked] = useState(
() => JSON.parse(localStorage.getItem('Wallet')) || false
);

useEffect(() => {
localStorage.setItem('Wallet', JSON.stringify(isWalletClicked));
}, [isWalletClicked]);

return (
<>
<GlobalStlyes />
Expand Down

0 comments on commit 85646ca

Please sign in to comment.