Skip to content

Commit

Permalink
Merge pull request #72 from MegaScenes/todos
Browse files Browse the repository at this point in the history
Todos
  • Loading branch information
brandonysli authored Jun 27, 2024
2 parents 1c76bb9 + 051341c commit 75aa959
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
9 changes: 5 additions & 4 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ import {
IconZoomOut,
IconPlus,
IconRefresh,
IconMenu2,
} from "@tabler/icons-react";
import OptionsDropdown from "../components/OptionsDropdown";
import SidePanel from "../components/SidePanel";
import SearchBar from "../components/SearchBar";
import ImageModal from "../components/ImageModal";
import { SceneType } from "@/types/scene";
import { SceneType } from "../../types";
import type { ImageData, CameraData } from "../hooks/useCOLMAPLoader";

const CAM_MAX_SCALE = 1;
Expand Down Expand Up @@ -378,9 +377,11 @@ const Home: React.FC = () => {
return (
<Suspense
fallback={
<div className={`bg-darkgrey flex items-center justify-center`}>
<div
className={`bg-darkgrey flex items-center justify-center w-full h-screen`}
>
<div
className={`animate-spin rounded-full border-t-4 border-white h-12 w-12`}
className={`animate-spin rounded-full border-t-4 border-white h-8 w-8`}
></div>
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

import { IconCircleDotted, IconCamera } from "@tabler/icons-react";
import { SceneType } from "@/types/scene";
import { SceneType } from "../../types";
import { useRouter } from "next/navigation";

interface CardProps {
Expand Down
1 change: 1 addition & 0 deletions src/components/OptionsDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ const OptionsDropdown: React.FC<OptionsDropdownProps> = ({
document.removeEventListener("mousedown", handleClickOutside);
};
}, [ref, toggleMenu]);

return (
<div className="relative" ref={ref}>
<button
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Autocomplete from "@mui/material/Autocomplete";
import TextField from "@mui/material/TextField";
import { VariableSizeList as List } from "react-window";
import { useRouter } from "next/navigation";
import { SceneType } from "@/types/scene";
import { SceneType } from "../../types";
import { IconMenu2 } from "@tabler/icons-react";

const OuterElementContext = React.createContext({});
Expand Down
2 changes: 1 addition & 1 deletion src/components/SidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import Card from "./Card";
import reconMetadata from "../../public/data/recon_metadata.json";
import { SceneType } from "@/types/scene";
import { SceneType } from "../../types";

interface SidePanelProps {
scene?: SceneType;
Expand Down
6 changes: 0 additions & 6 deletions src/types/scene.d.ts

This file was deleted.

13 changes: 13 additions & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module "react" {
interface InputHTMLAttributes<T> {
webkitdirectory?: string;
directory?: string;
}
}

export type SceneType = {
id: number;
name: string;
normalized_name: string;
no_of_rec: number;
};

0 comments on commit 75aa959

Please sign in to comment.