Skip to content

Commit

Permalink
Merge pull request #494 from pknu-wap/fix/#493-footer로_인한_수직_스크롤_제거
Browse files Browse the repository at this point in the history
#493 footer로 인한 수직 스크롤 제거
  • Loading branch information
wkdghdwns199 authored Sep 5, 2024
2 parents e04e6e9 + 7e82f00 commit abacf2d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Footer = ({ dark, toggleDarkMode }: ComponentProps) => {

return (
<FullLayout>
<footer className={`w-full z-30 flex justify-between items-center pr-3 pl-3 `}>
<footer className={`absolute bottom-10 w-full flex justify-between items-center pr-3 pl-3 `}>
<div>
© WAG!
</div>
Expand Down
11 changes: 6 additions & 5 deletions client/src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type ComponentProps = Props & PropsFromRedux;
const Header = ({ dark, toggleDarkMode }: ComponentProps) => {

const [play, setPlay] = useState(false);
const [soundEffectStatusValue, ] = useState(soundEffectStatus);
const [isClicked, setIsClicked] = useState(false)
const audioRef = useRef<HTMLAudioElement>(null);

Expand Down Expand Up @@ -72,7 +71,7 @@ const Header = ({ dark, toggleDarkMode }: ComponentProps) => {
audio.play(); // 소리를 재생합니다.
};

if (soundEffectStatusValue){
if (playSoundEffect){
playSound();
}

Expand All @@ -85,16 +84,16 @@ const Header = ({ dark, toggleDarkMode }: ComponentProps) => {
audio.play(); // 소리를 재생합니다.
};

if (soundEffectStatusValue){
if (playSoundEffect){
playSound();
}

}

return (
<header className="m-5 z-50">
<div className="flex justify-end z-50">
<div className="absolute left-10 top-7">
<div className="flex justify-between z-50">
<div className="relative top-2">
{dark ? (

<img className={`w-20 h-16 ${isClicked ? 'clicked' : ''}`} src="images/WAG_dark.2.png"
Expand All @@ -119,6 +118,7 @@ const Header = ({ dark, toggleDarkMode }: ComponentProps) => {
</img>
)}
</div>
<div className="flex justify-between z-50">
<audio ref={audioRef} src='audio/main_theme.mp3' loop />
{isChrome() ? (
<>
Expand Down Expand Up @@ -207,6 +207,7 @@ const Header = ({ dark, toggleDarkMode }: ComponentProps) => {
</RulesModal>
</>
) : null}
</div>
</div>
</header>
);
Expand Down
6 changes: 5 additions & 1 deletion client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ body {
-moz-osx-font-smoothing: grayscale;
@apply transition-colors duration-200 bg-light-bg dark:bg-dark-bg;
max-width: 1024px;
padding-bottom: 7vh;
/* padding-bottom: 7vh; */
}

footer {
max-width: 1024px;
}

code {
Expand Down
4 changes: 2 additions & 2 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import reportWebVitals from "./reportWebVitals";
import { Provider } from "react-redux";
import store from "./modules";
import Header from "./components/layout/Header";
import Footer from "./components/layout/Footer";
import { BrowserRouter } from "react-router-dom";
import { QueryClient, QueryClientProvider } from "react-query";
import { RecoilRoot } from "recoil";
import ReactModal from "react-modal";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import SquareBubble from "./components/layout/SquareBubble";
import Footer from "./components/layout/Footer";

const queryClient = new QueryClient();
const rootElement = document.getElementById("root") as HTMLElement; // id가 'root'인 엘리먼트를 찾는 코드를 변수에 할당
Expand All @@ -28,9 +28,9 @@ root.render(
<SquareBubble>
<Header />
<App />
<Footer/>
<ToastContainer />
</SquareBubble>
<Footer />
</BrowserRouter>
</RecoilRoot>
</Provider>
Expand Down

0 comments on commit abacf2d

Please sign in to comment.