Skip to content

Commit

Permalink
[feat] boostcampwm-2022#85 recoil 전역 설정
Browse files Browse the repository at this point in the history
- RecoilRoot 추가
  • Loading branch information
ktmihs committed Nov 28, 2022
1 parent 2aed7af commit 78b20b7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 6 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import { BrowserRouter } from 'react-router-dom';
import { Global } from '@emotion/react';
import { global } from './global';
import Router from './Router';
import { RecoilRoot } from 'recoil';

function App() {
return (
<>
<Global styles={global} />
<BrowserRouter>
<Router />
</BrowserRouter>
<RecoilRoot>
<BrowserRouter>
<Router />
</BrowserRouter>
</RecoilRoot>
</>
);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/Sidebar/Setting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import BackgroundSetting from './backgroundSetting';
import DeviceSetting from './deviceSetting';
import { settingWrapper } from './setting.styled';

const Setting = ({ permission }: { permission: boolean }) => {
const Setting = () => {
return (
<ul css={settingWrapper}>
<BackgroundSetting />
<DeviceSetting permission={permission} />
<DeviceSetting />
</ul>
);
};
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/component/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ type componentType = {
[key: string]: EmotionJSX.Element;
};

const Sidebar = ({ permission }: { permission: boolean }) => {
const component: componentType = {
mypage: <Mypage />,
friends: <Friends />,
chatting: <Chat />,
setting: <Setting permission={permission} />,
};
const component: componentType = {
mypage: <Mypage />,
friends: <Friends />,
chatting: <Chat />,
setting: <Setting />,
};

const Sidebar = () => {
const [isOpen, setOpen] = useState(true);
const [isMicOn, setMic] = useState(false);
const [isCamOn, setCam] = useState(true);
Expand Down

0 comments on commit 78b20b7

Please sign in to comment.