Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleveille committed May 31, 2024
1 parent ea272b9 commit fda8265
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

html,
body {
overflow-x: hidden;
padding: 0 !important;
overflow: auto !important;
}

a {
Expand Down
6 changes: 3 additions & 3 deletions src/components/DiscDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Image from "next/image";
import { useContext } from "react";

import { DiscContext, Modal } from "@components";
import { DiscContext, DiscModal } from "@components";
import { hexToRgba } from "@util";

import type { DiscDetailProps } from "@types";
Expand All @@ -29,7 +29,7 @@ export const DiscDetail = ({ name_slug }: DiscDetailProps) => {
const borderColor = hexToRgba(color, 0.25);

return (
<Modal>
<DiscModal>
<div
className="disc-detail"
onClick={e => e.stopPropagation()}
Expand All @@ -49,6 +49,6 @@ export const DiscDetail = ({ name_slug }: DiscDetailProps) => {
<Image src={pic} alt={name} width={400} height={340} className="disc-detail-img" />
</div>
</div>
</Modal>
</DiscModal>
);
};
4 changes: 2 additions & 2 deletions src/components/Modal.tsx → src/components/DiscModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { Modal as MuiModal } from "@mui/material";

import type { ModalProps } from "@types";

export function Modal({ children }: ModalProps) {
export function DiscModal({ children }: ModalProps) {
const router = useRouter();
const onClose = () => router.back();
return (
<MuiModal open={true}>
<MuiModal open={true} className="mui-fixed">
<div className="modal" onClick={onClose}>
{children}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export * from "./DiscContext";
export * from "./DiscCount";
export * from "./DiscDetail";
export * from "./DiscGrid";
export * from "./DiscModal";
export * from "./Filters";
export * from "./Header";
export * from "./Home";
export * from "./Modal";
export * from "./ScrollToTop";

0 comments on commit fda8265

Please sign in to comment.