Skip to content

Commit

Permalink
style: small typos and refactors [2024-12-01]
Browse files Browse the repository at this point in the history
  • Loading branch information
CHRISCARLON committed Dec 1, 2024
1 parent c3a257e commit d404114
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
4 changes: 2 additions & 2 deletions gridwalk-backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ async fn main() -> Result<()> {

// Create DynamoDB client
let table_name = env::var("DYNAMODB_TABLE").unwrap_or_else(|_| "gridwalk".to_string());
let app_db = Dynamodb::new(false, &table_name).await.unwrap();
// let app_db = Dynamodb::new(false, &table_name).await.unwrap();
// FOR LOCAL DB DEV
// let app_db = Dynamodb::new(true, &table_name).await.unwrap();
let app_db = Dynamodb::new(true, &table_name).await.unwrap();

// Create GeospatialConfig
let geospatial_config = GeospatialConfig::new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export function MapClient({ apiUrl }: MapClientProps) {
const handleModalClose = useCallback(() => {
setIsModalOpen(false);
setSelectedItem(null);
setUploadSuccess(false);
}, []);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
File,
X,
Upload,
CheckCircle,
ArrowLeft,
} from "lucide-react";
import { ModalProps, MainMapNav } from "./types";
Expand All @@ -22,18 +21,6 @@ const LoadingDots = () => (
</div>
);

const SuccessMessage = () => (
<div className="flex items-center bg-green-50 text-green-700 p-3 rounded-md">
<CheckCircle className="w-5 h-5 mr-2 flex-shrink-0" />
<div>
<p className="font-medium">Upload successful!</p>
<p className="text-sm text-green-600">
Your layer has been added to the map
</p>
</div>
</div>
);

const MapModal: React.FC<ModalProps> = ({
isOpen,
onClose,
Expand All @@ -42,7 +29,6 @@ const MapModal: React.FC<ModalProps> = ({
onLayerUpload,
isUploading,
error,
uploadSuccess,
}) => {
const router = useRouter();

Expand Down Expand Up @@ -144,8 +130,6 @@ const MapModal: React.FC<ModalProps> = ({
<span>{error}</span>
</div>
)}

{!isUploading && !error && uploadSuccess && <SuccessMessage />}
</div>
);
default:
Expand Down

0 comments on commit d404114

Please sign in to comment.